I'm looking since quite a long time something like a CLLocationManager
simulator that would enable me to simulate GPS positions (CLLocation
instances that could be retrieved through the CLLocationManager
standard delegate mechanism) along a predefined route for instance (with a KML or GPX file
as input, or whatever, but KML would be nice ;).
Something like this is available on the Android emulator and I was wondering if anything like this would exist for the iPhone simulator. At least this would be great and would speed up testing on the simulator instead of having to drive for real.... :/
If nothing like this exists, what would be your approach to fake such behavior and implement the simulator in such a way that the client is not impacted? (No code change in the delegate of the CLLocationManager
for instance.)
Thanks for your links, hints, approaches...
You can't inject the simulator, but you can subclass CoreLocation:
http://code.google.com/p/dlocation/
which subclasses CoreLocationDelegate to return real data on a device and data from a text file when on the simulator.
More info here
Testing CoreLocation on iPhone Simulator
HTH
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With