Does anyone know how to set the location (as it's picked up in CoreLocation services) in the iPhone Simulator? I've been browsing online docs all day and I can't find an answer. Speak up!
In my delegate callback, I check to see if I'm running in a simulator (#if TARGET_ IPHONE_SIMULATOR
) and if so, I supply my own, pre-looked-up, Lat/Long. To my knowledge, there's no other way.
So then there's no better way to test/debug a location tracking application?I'm used to RIM's Simulator and the Sun WTK which both allow you to script a trip to the grocery store so you can track how your application reacts to changes in the location. I suppose this could be mocked and abstracted behind an ObjC protocol. Maybe in another release or two Apple will unlock this ability.
Better late than never :)
I just came across this iSimulate which allows you to send Fake location to the app. The solution is NOT free.
> Q: How does iSimulate work?
> A: When added to your project, the iSimulate
> SDK library creates a listening server
> on your iPhone Simulator that waits
> for a connection from an iPhone/iPod
> running the iSimulate client. When
> such connection is established, the
> iSimulate client running on your
> iPhone/iPod captures all data from the
> accelerometer sensor, the touch
> events, the location and device ID and
> streams them to the server. The
> iSimulate SDK library then recreates
> all input events synthetically. This
> is entirely transparent to your
> application and does not interfere
> with your application's functionality.
Anyway, i am planning to get this. will update more soon!
Where you want to set your location? you can use mapkit api to show u location's. see icodeblog.com for more detail on how to use mapkit. Also you can store your desired cordinates just create an object CLLocation2D *location; location.longitude=your desired longitude value; location.latitude=your desired latitude value;