IOS8 Location Failure problem

Source: Internet
Author: User

Date: 2014-10-10

Today in the development of the discovery of a iOS8 location problem, after the operation, do not call to the delegate method after the location, and then I looked at the mobile phone on the application of the location of the interface, found that my app's access to the user's geographical location is empty, and then checked the relevant information, The following solutions are available:

1. In Appdelegate:

Cllocationmanager *locationmanager;
[UIApplication sharedapplication].idletimerdisabled = TRUE;    Locationmanager = [[Cllocationmanager alloc] init];    [Locationmanager requestalwaysauthorization];        Nslocationalwaysusagedescription    [Locationmanager requestwheninuseauthorization];     Nslocationwheninusedescription    locationmanager.delegate = self;

2. Add in Info.plist:
Nslocationwheninusedescription, allowing GPS descriptions to be obtained at the front desk
Nslocationalwaysusagedescription, allows the description of GPs to be acquired in the background

Such as:

After adding the above content will be able to locate services, Baidu Map and the gold map is also such a problem.

Recommended article: http://blog.csdn.net/yongyinmg/article/details/39521523

IOS8 Location Failure problem

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.