Is there a way to figure out programmatically if CoreLocation is displaying that alert?
I’m displaying a welcome screen and want to adapt it’s look if the alert shows up.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
When you call the instance method of
CLLocationManager-startUpdatingLocation, you can schedule aNSTimerwith interval of 1 second for example and inside the timer callback call the-authorizationStatusclass method ofCLLocationManager. If it returnskCLAuthorizationStatusNotDetermined, then the alert is shown and the user should choose either to allow or deny. If he denies then the-locationManager:didFailWithErrordelegate method is called with error codekCLErrorDeniedand you should stop updating location.