IOS 8 Location Failure issue

Source: Internet
Author: User

After upgrading iOS 8, you will find that the program that needs to be located does not eject the system's request location permission pop-up box on the first boot, and will cause the program to be unable to locate. This is due to some changes in iOS 8SDK,

Here is the workaround:

First step: Need to call Cllocationmanager's requestalwaysauthorization (for background location) before locating or requestwheninuseauthorization (location only when foreground) this basically solves the problem, the second step is optional.


Part II: Add Nslocationalwaysusagedescription or Nslocationwheninuseusagedescription to your info.plist (choose from the different positioning strategies you have before) key , specifying a sentence as its value. This allows the program to be positioned when the popup is opened for the first time, and the value as an explanation for positioning is also popped.


I hope we can solve the problem of your location failure.

IOS 8 Location Failure issue

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.