Thanks for the great feedback, it has prompted me to find a robust solution.
All the code can be found here:
http://code.google.com/p/dlocation/
It is very messy but as I use it it will be become much better.
The solution was to subclass CLLocationManager
and define a new delegate @protocol
, called DLocationManagerDelegate
.
It is designed to be a simple drop-in replacement for CLLocationManagerDelegate
that compiles down to a very thin layer when deployed on an actual device.
When running on the device it will return data as normal using CoreLocation
, but in the simulator it will read latitude and longitude from a text file (defined in the DLocationManager.h file).
I hope this helps, the implementation is on the simple side and you have to startUpdatingLocation
and stopUpdatingLocation
to update the display.
Comments and feedback will be gratefully received.