key point:-(void) Locationmanager: (Cllocationmanager *) Manager didchangeauthorizationstatus: (clauthorizationstatus) Status Proxy MethodiOS7Environment whenwhen the app first calls the Startupdatinglocation method to turn on location services, the app's targeting sub-option is automatically added to the list of targeted permissions in the settings, and the box prompts the user to authorize the app location service. However, in a iOS8 environment, the way to use location services is changed in comparison to the previous version, and the Startupdatinglocation method is calledThe Requestwheninuseauthorization method needs to be called to request the location permission, but when the user closes the location service Master switch, it is not possible to add the app-positioned sub-options to the location permission list. The user cannot find the app's sub-options after opening the location master switch, unless the location service switch is turned on to join the list of permissions properly;The workaround is to place the Startupdatinglocation method with the open location in the Didchangeauthorizationstatus: Proxy method called:1) First call the Requestwheninuseauthorization method request location permission (IOS7 and previously do not need to call this method);2)And thencalling the Startupdatinglocation method in the Didchangeauthorizationstatus: Proxy methodRequest a location, in this way, regardless of whether the total switch of the location service is open, the app's targeting sub-option can be added to the location permission list.
Resolves an issue where the app targeting sub-option cannot be added to the location permission list when the user closes the location Services master switch in a iOS8 environment