简体   繁体   中英

Turn off simulate user location by Xcode

I am using iPhone 4 to test my iOS app.

In my project I have .gpx files that allow me to simulate some specific location when iPhone is plugged in to my Mac. Unfortunately when I unplug my iPhone I still see that location, not the current user location.

Is it possible to set user location back? How can I achieve that?

I tried disable and re-enable user location, delete and install application, but it doesn't work. Looks like it is not possible.

  1. Delete the app from the device.
  2. Under "Edit Scheme" uncheck the Core Location "Allow Location Simulation" setting.
  3. IMPORTANT STEP! Turn the device off and then back on. (Clears out the GPX file, I believe).
  4. Then re-load the app to the device.

Simpler working solution is:

In XCode goto Product -> Scheme -> Edit Scheme

Options -> Default Location: None

Rebuild application

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM