Xcode 13 is missing settings for location services under iOS15
Asked Answered
S

1

19

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

Speculum answered 21/9, 2021 at 18:0 Comment(19)
I have exactly the same issue on Xcode 13.0!Natatorium
same for me as well. Can't find the option. Seems like either it is moved to some other menu or removed completely.Wellmannered
@Wellmannered - 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.Speculum
Totally agree. we might see a fix for this in upcoming releases.Wellmannered
Did you find a solution to this yet?Recruit
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.Speculum
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.Speculum
In case you're looking for this for UI testing, Apple has provided an API for reseting location settings: app.resetAuthorizationStatus(for: .location)Chafe
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.Speculum
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.Speculum
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.Speculum
It's unbelieveable that Apple hasn't corrected this yet. Are they sleeping?Gaze
@Gaze - I submitted the official bug report that has been seen by Apple, so they know about it. It will get fixed eventually.Speculum
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)Fears
@Fears - I checked as well and got the same results. It will be interesting to see how long it takes Apple to fix this bug.Speculum
Looks like the Location Services is missing no matter which device I choose. I haven't tried different iOS versions though.Fears
@Fears - 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.Speculum
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.Speculum
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.Speculum
P
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)

Parnassian answered 23/8, 2022 at 12:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.