In the iOS8 environment, when you disable the positioning service General switch, you cannot add the APP positioning sub-options to the positioning permission list. ios8app
Key points:-(void) locationManager :( CLLocationManager *) manager didChangeAuthorizationStatus :( clthorizationstatus) when the APP calls the startUpdatingLocation method for the first time in iOS7, the system will automatically add the positioning sub-options of the APP to the positioning permission list in the settings, and prompt the user whether to authorize the APP positioning service. However, in the iOS8 environment, the method of using the location service has changed compared with the previous version. before calling the startUpdatingLocation method, you need to call the requestWhenInUseAuthorization method to request the location permission. However, when you disable the location service overview switch, using this method alone, you cannot add the sub-options for APP positioning to the positioning permission list. After you enable the positioning General switch, you cannot find the sub-options for the APP, the permission list can be added normally only when the locating Service general switch is enabled. The solution is to place the startUpdatingLocation method enabled and located in the didChangeAuthorizationStatus: proxy method call: 1) first, call the requestWhenInUseAuthorization method to request the positioning permission (iOS7 and previously do not need to call this method); 2) then call the startUpdatingLocation method in didChangeAuthorizationStatus: proxy method to request This solution adds the positioning sub-options of the APP to the positioning permission list regardless of whether the general switch of the positioning service is enabled.