03 Aug '12, 9pm

Testing your location in iOS by faking CoreLocation

August 3, 2012 Tagged: ios testing Objective-C CoreLocation Comments (View) Faking CoreLocation… Inconceivable! I decided to get more familiar with integration testing iOS applications. In the past I’ve found trying to do integration testing analogous with climbing the side of a cliff. Given that I’m no Dread Pirate Roberts this has proven very challenging in the past. To challenge myself even further I decided to write an integration test around CoreLocation. In the simulator I can set a location for myself and to some degree I could test with this, but I wanted to be able to have different test scenarios given different locations. One solution was to use something like FTLocationSimulator and do the following: #ifdef FAKE_CORE_LOCATION self.locationManager = [[FTLocationSimulator alloc] init]; #else self.locationManager = [[CLLocationManager alloc] init]; #endif But I’m ...

Full article: http://robots.thoughtbot.com/post/28649557009/faking-core...

Tweets

Testing your location in iOS by faking CoreLoca...

robots.thoughtbot.com 03 Aug '12, 9pm

August 3, 2012 Tagged: ios testing Objective-C CoreLocation Comments (View) Faking CoreLocation… Inconceivable! I decided ...