Search code examples
xcodeios-simulatorxcode8core-locationgpx

My Xcode simulator's location is stuck on custom Location


I was testing a GPX file with Xcode. I read this tutorial and downloaded this file. Edited my scheme and added the GPX file as a custom location.

Then I decided to change the GPX file. I added the modified GPX file to Xcode. My Xcode crashed. I reopened and added again and it crashed again. I removed all GPX files in my folder and tried adding again, but it crashed again. I cleaned build, cleaned derived data, reset my simulator, restarted my mac. None worked. So I just forgot about adding the GPX file.

Looking into the crash logs of Xcode this is partially what I see meaningful:

ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/DVTFrameworks/DVTFrameworks-11754/DVTFoundation/FoundationClassCategories/DVTNSStringAdditions.m:1110 Details: (basePath) should not be nil

I also looked into this Apple Forum thread. But that wasn't helpful.

I also asked a friend of mine to look into that folder and share their file with me. They looked but said they don't have such a file, and yet they don't have any errors :(


So then now I opened another project (I never added any GPX file to this). I'm trying to change the location on the simulator. I set it to Freeway drive. It only enforces a momentarily location update, after that it switches back to Custom Location.

So I did all of the above and also uninstalled Xcode and had in reinstalled. Still same issue, can't change simulator location!

Has anyone had any similar experience?


Solution

  • I'm not sure but I think for things that can be modified from multiple places of your Xcode: You have to go to ALL entrypoints that you can change and just tweak it back and forth see if it works.

    I was changing the location from simulator itself. It wasn't working. So I went to:

    Edit Scheme >> Options >> Allow Location Simulation

    From there I just changed the location between different locations. Quit simulator and all of a sudden I was able to simulate to Freeway drive on my simulator. Haven't tried adding any GPX file yet. Most likely I won't! The issue was too much of a headache!