I found that my controller is out of the view hierarchy in this code andI call this in viewDidLoad:
if CLLocationManager.locationServicesEnabled() {
// code
} else {
let alertController = UIAlertController(...)
//
present(alertController)
}
If I wrap else clause in .async or .asyncAfter in the main queue I have my issue go away. Why do this happen here?
Thank you!