31

I just updated from Xcode 9 to Xcode 10 a day ago, and when I was about to debug my location tracking app just realized that I never received device location. So I went to Maps app to check if it was just a problem with my app, but when I turn location debug to any dynamic location (City Bicycle Ride/City Run/Freeway Drive) even Maps fails getting device's location (almost always), but when I set it to a static location (Apple) it works without any problem.

Location: Apple

Location: Apple

Location: City Bicycle Ride

Location: City Bicycle Ride

Location: City Run

Location: City Run

Location: Freeway Drive

Location: Freeway Drive

I'm the only one facing this issue or its actually a Xcode/Simulator problem?

EDIT: Still happening on Xcode 10.1

Community
  • 1
  • 1
Jose Vf
  • 1,493
  • 17
  • 26
  • 1
    I have the same problem but haven't found a solution yet... – Marco Weber Sep 23 '18 at 11:11
  • 1
    i have same problem – lozflan Sep 23 '18 at 21:31
  • 1
    So much regret to updated xcode version smh – Isaac Sep 24 '18 at 03:01
  • 2
    Have the same problem since Xcode 10 GM – Skyborg Sep 24 '18 at 16:55
  • 1
    Have the same problem - have reported bug to Apple (please do the same) - bizarrely in my case a restart of XCode (not just the simulator) can sometimes fix it. – Hayden Crocker Sep 29 '18 at 21:41
  • 1
    Got the exact same issue. Trying to test significant location updates so this is a bit of an issue... – MattCheetham Oct 17 '18 at 11:07
  • Having the same problem on both Xcode 10 GM and beta – Daniel Hsu Oct 18 '18 at 00:45
  • 1
    Me too. It is endlessly frustrating that Apple QC on each new release of Xcode or iOS doesn't even perform all legacy functions. Location Services is for me the most glaring problem with Xcode 10 so I went back to Xcode 9.4, but still apps modified while I was using Xcode 10 won't even load and execute in iOS 12!!! This nonsense must stop. – Michael Young Oct 19 '18 at 20:25
  • I have the same problem. For me I can get around it by changing between 'Apple', and one of the options that simulates movement ('City Run', 'City Bicycle Ride' and 'Freeway drive') a few times. Sometimes it works with just changing between 'Apple' and 'Freeway drive' 2 times, whereas other times I have to do it 6-7 times before it works. – Jonas Oct 24 '18 at 09:49
  • I have the same issues (in Xcode 10.1 and iOS 12.1). It seems that an older OS doesn't suffer from this. My simulated iOS 11.2 starts immediately. Might be a workaround for some. – Dirk van Oosterbosch Dec 06 '18 at 15:22
  • 1
    This is the second time that Xcode was release with a very obvious bug in the simulator preventing testing with locations. I'm very, very annoyed that Apple allows this to happen and then fails to acknowledge the bug. I've reported the bug, but I cannot find any admission by Apple that it even exists. – Michael Young Jan 06 '19 at 01:29
  • 1
    Same problem here and can't believe this problem persist for so long without fixes – Olegdater Mar 27 '19 at 12:21
  • Still seems to be an issue in 2023 almost. – Jay Ordway Dec 27 '22 at 18:48

3 Answers3

16

Still happening in Xcode 10.0, and the only thing that seemed to make it work was to have 'Allow Location Simulation' turned on in your scheme and toggling between 'Apple' and 'City Run' under your simulator's top menu:

Debug > Location > Apple

Debug > Location > City Run

(back and forth between them until your run actually begins to simulate)

  • Obviously not a permanent solution, but it can save you hours of debugging your own code vs pulling your hair out, yelling at Apple. Though we should def yell at Apple for this one.
Iain Smith
  • 9,230
  • 4
  • 50
  • 61
klopez
  • 310
  • 2
  • 7
  • Thanks, this helped! I was switching back and forth between City Run and the other options (City Bicycle Ride, None, etc), but had no luck. For some reason, switching to the 'Apple' option seems to reset things. – mmh02 Jan 23 '19 at 03:39
6

What works for me is to go to Settings in the simulator and turn off and back on the location services under privacy. Then choose debug > location > apple > devised activity

Starkus
  • 147
  • 8
0

Setting a custom location at Debug > Location > Custom Location, then changing it slightly will reliably trigger a location update.

Gabriel Jensen
  • 4,082
  • 1
  • 17
  • 14