views:

183

answers:

3

Is there a way to use real location services in the simulator only (no device involved)? It always goes to Cupertino.

+2  A: 

Nope, you'll have to deploy to your device.

Depending on how difficult that makes your life, and depending on what you are doing, you might be able to use conditional compiling to run a block of custom locator code that only runs in the simulator. That way you can set up some sort of hard-coded location values to read from, or something.

bpapa
+6  A: 

I don't think it's possible to use real location data in the simulator, but it's fairly trivial to wrap the CLLocationManager class in a class of your own design, and provide test data from your class when you're running in the simulator, and use CoreLocation when you're on the device.

Mark Bessey
+6  A: 

Yes, you can use real location data in simulator with the help of iSimulate. You still need the real device, but the real device just pumps data into simulator, so you can still keep testing on simulator with all its benefits (speed!) with real location, accelerometer etc data from device.

Jaanus
That's kind of cool, but I never really felt like app install turnaround time was impeding my testing. Maybe with a really large app that'd be more of a problem...
Mark Bessey
Slower install and app startup/teardown time are really noticeable for me on device vs simulator.
Jaanus
I've edited my question to be a little more clear. Thanks.
4thSpace