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

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.