requestWhenInUseAuthorization Crash iOS 18 Beta 4

When I call requestWhenInUseAuthorization in state kCLAuthorizationStatusNotDetermined on iOS 18 Beta 4 in the simulator, all my apps just terminate without any error message in the Xcode console (black screen with an activity indicator for a second or two and then it goes back to the springboard). I do have the NSLocationWhenInUseUsageDescription set in my Info.plist file.

When running the exact same apps in Xcode 16.0 beta 4 (16A5211f) but with a iOS 17 simulator attached, it is working as expected by showing the location authorization dialog.

Is this a known issue or am I missing something?

I am experiencing the same here. Have you been able to try it on a real device yet? (I haven't so far). I would think it is a bug. I could work around it for now by going into Settings > Privacy > Location Services on the simulator and then Authorize the app there. I have submitted a ticket in Feedback Assistent for this.

Our engineering teams may need to investigate this issue, as this might indicate an issue with iOS 18 Beta.

We'd greatly appreciate it if you could open a bug report, include crash logs and sample code or models that reproduce the issue, and post the FB number here once you do.

Bug Reporting: How and Why? has tips on creating a successful bug report.

It's fixed in iOS 18 Beta 5.

Its not working on iOS 18 RC release. App does not crash but alert window for asking for permissions is not invoke at all.

Also this bug is in 18.1 as well.

requestWhenInUseAuthorization Crash iOS 18 Beta 4
 
 
Q