The iOS dialog box prompts and disappears in half a second:
let locationManager = CLLocationManager()
switch CLLocationManager.authorizationStatus() {
case .authorizedWhenInUse:
print("In Use \(locationManager.location?.description)")
case .denied, .restricted:
print("denied")
case .notDetermined:
locationManager.requestWhenInUseAuthorization()
case .authorizedAlways:
print("always \(locationManager.location)")
}
I do not know how relevant this is, but I use SWReavealViewController. Xcode9 compiled for iOS 8.0, both a simulator and a real device
gutte source
share