Stephen Hsu
Stephen Hsu

Reputation: 5187

May I specify the current location for testing purposes?

For testing purposes, is it possible to specify a coordination as the default current location. As the app runs in the simulator, it returns the specified location when the app needs current location.

Upvotes: 2

Views: 103

Answers (2)

eelkedev
eelkedev

Reputation: 919

It's also possible to use GPX files. These are small XML-based files that have longitude and latitude information. This way you can create some easy to use favorite locations, which you can trigger from the debug area (from the "Simulate Location" compass icon) or from Product > Debug > Simulate Location. You can set any of them as your default location. Very handy! Also works as an override for attached devices.

I use http://www.gpx-poi.com to create them, but I'm sure you do it in other ways too.

Upvotes: 1

ennuikiller
ennuikiller

Reputation: 46965

You can of course do this through the simulator: Debug -> Location -> custom location

Upvotes: 1

Related Questions