Nitish
Nitish

Reputation: 14113

Does CLLocationManager Alert comes only in the start of application?

In my application I want to display CLLocationManager alert("App name" would you like to use your location) twice. One at the beginning and one, somewhere in middle of application in one of the controllers.

Is it possible to show this alert twice in application? Also, does this alert come only at the start of application, even though we CLLocationManager is set somewhere later in application?

Upvotes: 0

Views: 496

Answers (2)

Maulik
Maulik

Reputation: 19418

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:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs://"]];

in your app to open Settings app.

Upvotes: 1

Inder Kumar Rathore
Inder Kumar Rathore

Reputation: 39988

This is a system generated alert and only comes when you try to access the location services via CLLocationManager object. And it won't come twice as far as I know, because either user allow it or deny it.

Upvotes: 1

Related Questions