The CLLocationManager prompts an alert
“App name” Would you like to use your location
which offers two buttons, OK and Don’t allow. How to know which of the buttons has the user selected?
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 click on Don’t allow button
- (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)errorwill be called with
kCLAuthorizationStatusDeniedexception. You can write your inside it.Also refer :
Example :
if user clicks on allow then
If clicks on don’t allow
EDIT
Alternate : you can display an alert that ask user to allow location access by enable location service from
Settings.You can use this on iOS 5.0 and later:
in your app to open Settings app.