You will have to construct your own dialog to ask for this permission if you want to ask every time.
By default the Apple triggered dialogs appear once (or twice in iOS8) when you first ask for access to the Location APIs.
To have iOS ask for permission you need to do a couple of things (in iOS8):
add NSLocationAlwaysUsageDescription
or requestWhenInUseAuthorization
to your info.plist these keys hold a string which iOS uses i the dialog it presents when you preform the next step:
send requestAlwaysAuthorization
or requestWhenInUseAuthorization
to an instance of CLLocationManager. i.e.
CLLocationManager* myLocationManager = [[CLLocationManager alloc] init];
[myLocationManager requestAlwaysAuthorization];
At this point iOS will display the dialogs you are familiar with. iOS8 will also display another dialog to confirm this some time after the initial permission (about two days). It will not ask repeatedly.
if you want to construct your own dialog, you should do this:
UIAlertController* alert = [UIAlertController alertControllerWithTitle:@"Use bluetooth"
message:@"is it ok for this app to use Bluetooth"
preferredStyle:UIAlertControllerStyleAlert];
UIAlertAction* yesButton = [UIAlertAction actionWithTitle:@"Yes"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction *action) {
// This code runs when the user presses YES.
// You should also add code to handle a NO button.
}];
[alert addAction:yesButton];
You then need to display the alert. Probably using presentViewController::