Frank Schmitt
Frank Schmitt

Reputation: 25775

iOS Simulator Always resets Location to "None"

I'm debugging a location-aware app, and getting frustrated with the iOS simulator. For some reason every time I run my app from Xcode the Location setting (under the Debug menu) resets to "None" (from "Custom Location…").

Anyone know how to prevent this?

Upvotes: 21

Views: 6531

Answers (3)

Schnemar
Schnemar

Reputation: 1

I was using a .gpx file but still not working. Then I created a new one using the online generator described above by Shams Ahmed and this one is working fine now. The difference between the old and the new .gpx file was, that I was using a comma in my coordinates (14,99889), not a dot (14.99889)!

Upvotes: 0

zvonicek
zvonicek

Reputation: 1503

You can set it in Default location option as Shams Ahmed mentioned, but there is one more option.

If you want XCode to keep your preference you made in Debug – Location menu in iOS Simulator, simply deselect the Allow Location Simulation checkbox in the Edit scheme menu. Now the location will not be reset to "None" and iOS Simulator will respect your location setting.

Upvotes: 20

Shams Ahmed
Shams Ahmed

Reputation: 4513

In your project select edit scheme and go to the option tab. Edit default location to your liken.

enter image description here

Check apple doc for other customizable option. If you want to create a permanent location create a GPX file with editor or online generator

Upvotes: 38

Related Questions