Post

Replies

Boosts

Views

Activity

CoreLocation location permission dialog not displayed when in split view
This is a cross-post from StackOverflow: https://stackoverflow.com/questions/73577615/corelocation-location-permission-dialog-not-displayed-when-in-split-view Here is the simplified version of my code: import UIKit import CoreLocation class ViewController: UIViewController { override func viewDidAppear() { super.viewDidAppear() let locationManager = CLLocationManager() locationManager.delegate = self locationManager.requestWhenInUseAuthorization() } } extension ViewController: CLLocationManagerDelegate {} When launched, I expect this code to display the location permission dialog. I've added the NSLocationWhenInUseUsageDescription key into Info.plist file already. This code works correctly when the application runs in full screen. However, when launched in split view the dialog never appears. I couldn't find anybody else battling this problem except for this forum: https://developer.apple.com/forums/thread/686064 which didn't come to any conclusion. I thought it may be the OS limitation, but Google seem to have figured it out: Posting another question on the forum in the hopes that an Apple engineer or somebody who battled this problem before will across it. Any ideas?
1
0
537
Sep ’22