As title, you used LocationManager to request the permission and user’s current location in your code, but the devices couldn’t pop up a dialog to ask Location Service usage. It is because you forget to add Privacy information in Info.plist.
override init() {
super.init()
locationManager.delegate = self
locationManager.desiredAccuracy = kCLLocationAccuracyBest
locationManager.requestWhenInUseAuthorization()
locationManager.startUpdatingLocation()
}
It is very simple to fix but hard to figure out where the location it is.
You just add “Yes” for “Privacy — Location When In Use Usage Description”, or the other one for “Always Usage”. Then rebuild and redeploy the app to your device. It will pop up the dialog to ask Location Service permission. Hope this could help you resolve this issue. :)