Request to use permission does not show invitation

I have

NSLocationWhenInUseUsageDescription 

and

 NSLocationAlwaysUsageDescription 

defined in my Info.plist.

In my code I do

  if ([_locationManager respondsToSelector:@selector(requestWhenInUseAuthorization)]) { [_locationManager requestWhenInUseAuthorization]; } [_locationManager startUpdatingLocation]; 

And I do not receive a request for iOS8.

I did a clean reinstall in my simulator. On iOS7 without block 3 if I will be asked.

Immediately after startUpdatingLocation, I check [CLLocationManager authorizationStatus] , which is 0- kCLAuthorizationStatusNotDetermined

How can I tell iOS8 users?

0
ios8 core-location
source share
1 answer

4 ios 8: you need to configure it in the info.plist file,

key name as "NSLocationAlwaysUsageDescription" value as ""

key name as "NSLocationWhenInUseUsageDescription" value as ""

When you call:

 [_locationManager requestWhenInUseAuthorization]; 

will be automatically requested.

Testing with a simulator, you can click "Reset content and settings ..." and request again.

Here is a demo: https://github.com/JNYJ/001PGWUcurrentWULF

0
source share

All Articles