Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I avoid XCode resetting the location on my iPhone every time it runs

Every time I run XCode, my location is being reset to a location in London. It doesn't recover until I reset my device.

How do I avoid this?

like image 573
Peter Johnson Avatar asked Feb 01 '13 00:02

Peter Johnson


People also ask

How do I trust Xcode on iPhone?

Tap Settings > General > Profiles or Profiles & Device Management. Under the "Enterprise App" heading, you see a profile for the developer. Tap the name of the developer profile under the Enterprise App heading to establish trust for this developer. Then you see a prompt to confirm your choice.

Why does my iPhone keep losing GPS signal?

Causes of iPhone GPS Not Working. Some settings on the iPhone intentionally prevent GPS from working. Other causes for GPS not working are a weak signal, outdated maps data, or hardware failure. Although iPhone GPS issues are not common, they can occur after you update the iOS.

How do I fix my GPS location on my iPhone?

In the Settings app, tap Privacy, then tap Location Services. Make sure Location Services is on, and make sure Maps is set to While Using the App or Widgets. Set the date, time, and time zone correctly on your device.


1 Answers

This took me a month or two to spot and track down, so I am posting for the benefit of others. as Apple Customer Support were unable to diagnose it, and even went so far as to swap my device for a new one- which of course didn't help. There was nothing about this on Google.

I eventually diagnosed it by setting "Find My Friends" to geofence my real location and send a message when it spotted me leave. The second I started running my app on Xcode it pinged instantly.

There is a setting in XCode that sets the GPS to a chosen dummy location whenever you run your app. It can be found by selecting Product>Scheme>Edit Scheme from the top menu, then select "Run appname" on the left and "Options" at the top. The one you want is "Core Location: Allow Location Simulation."

Just uncheck that box. Problem solved.

like image 60
Peter Johnson Avatar answered Sep 19 '22 00:09

Peter Johnson