Positioning manual Licensing issues after IOS 8

Source: Internet
Author: User

iOS8 will be manually authorized after the location permissions, but not to deal with the iOS8 after the system would be the default never authorized to turn off the location permission to handle the following methods1Import Frame header file #import <CoreLocation/CoreLocation.h>2. declaring instance Variable Cllocationmanager *Locationmanager3The first step of initialization is key:if(!Locationmanager) {Locationmanager=[[Cllocationmanager alloc] init]; if(isAfterIOS8) [Locationmanager requestwheninuseauthorization];//iOS8 Manual Authorization later (allows for a description of GPs in the foreground)       /*//Get permanent authorization to locate the GPS description is available at the front desk and backstage [Locationmanager requestalwaysauthorization];//above method two selected according to project requirements*/and then process the relevant map method to open the location AH or what the third party such as: Baidu map initialization call, etc.4The second is to configure the Info.plist file to choose which authorization to add the corresponding keyword key value optional (is a string type such as "agree to the service will be better use of the app"I think there is no error in writing bool.allow the foreground to get GPS description key-->Nslocationwheninuseusagedescription allows permanent acquisition of GPS description key ———>nslocationalwaysusagedescription5The application will then be installed like before the first time you open will be prompted if you want to agree to the location of the service, consent to normal operation of the app's positioning function, if not agree, only in Settings, privacy, location services, find your corresponding app to set up

Positioning manual Licensing issues after IOS 8

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.