16

I updated to Xcode 13 last night. Today I find that if I run the simulator for iOS 15 there is no location services settings under privacy, yet on my physical iPhone which is also updated to iOS 15 there is (phone is an Xr). If I run the Xcode simulator for iOS 14 then the settings for location are there under privacy. Where did the setting for privacy go on the simulator? Is anyone else seeing this behavior?

Attached is an image of the simulator running iOS 14 which has the location services, and then an image of the simulator running iOS 15, which does not have the location services. Does anyone have any idea why the iOS 15 simulator does not have settings for location services (and yet iOS 15 on a Xr does!). Any ideas?

enter image description here

enter image description here

JustMe
  • 319
  • 3
  • 11
  • 1
    I have exactly the same issue on Xcode 13.0! – Andrew Sep 25 '21 at 20:03
  • 1
    same for me as well. Can't find the option. Seems like either it is moved to some other menu or removed completely. – vk.4884 Sep 27 '21 at 08:10
  • @vk.4884 - I do not think it is moved or removed. If I look at the same menu on a physical iPhone running iOS 15 the menu option is there, exactly where it was in iOS 14. It is **only** missing in iOS 15 on the Xcode 13 simulator. I think this is a bug in the simulator for Xcode 13. – JustMe Sep 28 '21 at 13:19
  • Totally agree. we might see a fix for this in upcoming releases. – vk.4884 Sep 29 '21 at 08:04
  • Did you find a solution to this yet? – Aaron Sep 30 '21 at 17:15
  • I have updated to Xcode 13.1 on macOS Monterey (12.0.1) with a deployment target of iOS 15 (there is no 15.1 deployment target for Xcode 13.1). The problem is still there, the same as it was under Xcode 13 on macOS Big Sur. On a physical phone the menu item is there, on the iOS 15 simulator it is not. I have reported this to Apple, but gotten no response as of yet. – JustMe Oct 27 '21 at 16:54
  • 1
    Just an update for anyone following this thread. I have retested this with macOS Monteray (12.1) with Xcode 13.2.1 (13C100) on the Xcode simulator running iOS 15.2. The behavior does not change, the location services part of the privacy section of the settings app is still missing from the simulator. – JustMe Dec 24 '21 at 17:20
  • 2
    In case you're looking for this for UI testing, Apple has provided an API for reseting location settings: `app.resetAuthorizationStatus(for: .location)` – rmp251 Mar 01 '22 at 20:38
  • Thanks. That is useful for sure. I really use this just when doing development work to flip settings as I write location based code. It is easy enough to just attach to an iOS device and do any work there, so it is not a huge deal, but it is clearly "broken" in the simulator. – JustMe Mar 03 '22 at 00:22
  • FYI - I have retested this again with macOS Monterey (12.3), Xcode 13.3 (13E113), Simulator 13.3 (977.2), running iOS 15.4. There is no change, the location services part of the privacy section of the settings app on iOS running on the simulator is still missing. – JustMe Mar 29 '22 at 19:24
  • FYI - I have retested this again with macOS Monterey (12.3.1), XCode Version 13.3.1 (13E500a), Simulator Version 13.3.1 (977.2), running iOS 15.4. There is no change, the location services part of the privacy section of the settings app on iOS running on the simulator is still missing. – JustMe Apr 22 '22 at 21:39
  • 1
    It's unbelieveable that Apple hasn't corrected this yet. Are they sleeping? – JCraine Apr 26 '22 at 03:57
  • 2
    @JCraine - I submitted the official bug report that has been seen by Apple, so they know about it. It will get fixed eventually. – JustMe Apr 26 '22 at 21:03
  • Issue is still present in fresh Xcode 13.4 (13F17a) from May 2022 - so it's already 7 months. I've tested with iPhone SE (3rd gen) – piotr_cz May 26 '22 at 08:38
  • @piotr_cz - I checked as well and got the same results. It will be interesting to see how long it takes Apple to fix this bug. – JustMe May 27 '22 at 23:24
  • Looks like the Location Services is missing no matter which device I choose. I haven't tried different iOS versions though. – piotr_cz May 30 '22 at 12:42
  • @piotr_cz - The issue is across devices on the simulator starting with iOS 15.0. I did not have the problem with iOS 14 and below. Of course, if you connect Xcode to a physical iPhone, the problem does not exist even on iOS 15.*. I conclude that the "bug" is in the iOS 15 simulator. It would not surprise me if Apple's fix for this is to fix it for iOS 16 and just leave iOS 15 missing this feature. – JustMe May 31 '22 at 20:52
  • 1
    FYI - I have retested this again with macOS Monterey (12.6), XCode Version 14.0 (14A309), Simulator Version 14.0 (986.3), running iOS 16.0 (20A360). There is no change, the location services part of the privacy section of the settings app on iOS running on the simulator is still missing. This is a bit more significant because this is now a bug in both iOS 15 and iOS 16 on the Xcode simulator. It no longer is limited to a single iOS major version. – JustMe Sep 18 '22 at 16:03
  • FYI - I have retested this again with macOS Ventura (13.0.1), XCode Version 14.2 (14C18), Simulator Version 14.2 (986.5), running iOS 16.2 (20C52). There is no change, the location services part of the privacy section of the settings app on iOS running on the simulator is still missing. – JustMe Dec 15 '22 at 02:54

1 Answers1

2

Unfortunately this is still not available as of iOS 15.5 with Xcode 13.4.1, and as per Apple forums this bug still open "Xcode 13.1 iOS 15.0 simulator missing location privacy settings" https://developer.apple.com/forums/thread/693317?answerId=723302022#723302022

If anyone is looking for this setting to reset Location and Privacy for the UI Tests, we can make use of the XCTest API func resetAuthorizationStatus(for resource: XCUIProtectedResource)

As suggested by rmp251 in the comments Usage: app.resetAuthorizationStatus(for: .location)

jaishankar
  • 249
  • 1
  • 4
  • 13