#iphone6 and iphone6plus adaptation of the old project #ios8 unable to open location problems and # solutions #

Source: Internet
Author: User

The permanent address of this article is http://www.cnblogs.com/ChenYilong/p/4020359.html, please indicate the source of reprint. The location of the iOS8 and the access to the push have changed,

The following are the differences when iOS7 and iOS8 apply for location permissions:

iOS7: The permanent address of this article is http://www.cnblogs.com/ChenYilong/p/4020359.html, please specify the source of the reprint. iOS8: The permanent address of this article is http://www.cnblogs.com/ChenYilong/p/4020359.html, please specify the source of the reprint.we know that Apple has greatly optimized positioning on iOS8, which can support indoor positioning, frequent location statistics, floors, etc. ButThe currentlocation is empty on the iOS8, causing the location to fail. The German also failed to locate (The reason may be that iOS8 did not fit), or do not call to the delegate method after the location, then I looked at the mobile phone on the app's location permissions interface, found that my app's access to the user's geographical location is empty, and then checked the relevant information, the following solutions:1. In appdelegate or other settings Cllocationmanager Controller :
Statement@property(nonatomic,Strong)Cllocationmanager*locationmanager; implemented inAdd the following code[uiapplicationsharedapplication].idletimerdisabled=TRUE;
???
Self.Locationmanager= [[CllocationmanagerAlloc]Init];
???
Self.Locationmanager.Delegate= Self;??? Self. Locationmanager. desiredaccuracy=kcllocationaccuracybest;???if(Is_ios8){
[??? Self.Locationmanagerrequestalwaysauthorization];???//nslocationalwaysusagedescription
??? [
Self.Locationmanagerrequestwheninuseauthorization];??? //nslocationwheninusedescription }??? [Self. Locationmanager startupdatinglocation]; in theAppdelegate is set up in this way:@interface appdelegate () <cllocationmanagerdelegate>{??? Uinavigationcontroller *_navcontroller;??? Cllocationmanager????? *_locationmanager;}? @end? @implementation appdelegate-(BOOL) Application: (UIApplication *) application didfinishlaunchingwithoptions: ( Nsdictionary *) launchoptions{??? [UIApplication sharedapplication].idletimerdisabled = TRUE;?????? _locationmanager = [[Cllocationmanager alloc] init];??? [_locationmanager requestalwaysauthorization];??????? Nslocationalwaysusagedescription??? [_locationmanager requestwheninuseauthorization];???? Nslocationwheninusedescription??? _locationmanager.delegate = self;} The permanent address of this article is http://www.cnblogs.com/ChenYilong/p/4020359.html, please specify the source of the reprint.
2. and need to be set in the Plist file:Setup Method:? In the Info.plist add:??? 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, you can locate the service, some of the following problem # solutions # also:
    1. IOS8 German Map SDK Mamapview Unable to locate the problem (http://blog.csdn.net/johnzhjfly/article/details/39497751)
    2. IOS8 Baidu Map SDK Mamapview Unable to locate the problem
    3. IOS8 location not?accessible
    4. IOS8 Mkmapview Agent Invalid issue
    5. Access the user's location on Today Extension?
    1. IOS8 Unable to open location problem
The permanent address of this article is http://www.cnblogs.com/ChenYilong/p/4020359.html, please indicate the source of the reprint.?Extended reading:
    1. iOS8 positioning new features (http://blog.csdn.net/yongyinmg/article/details/39521523)
    2. http://blog.uniba.jp/post/91830563468/ios-8http://www.cocoachina.com/bbs/read.php?tid-217107.htmlhttp:// www.cocoachina.com/ask/questions/show/87714http://9to5mac.com/2014/06/04/ apple-improves-location-services-in-ios-8-with-when-in-use-mode-visit-monitoring/http://derjohng.doitwell.tw/ 6197/%e9%9b%bb%e8%85%a6%e9%a1%9e%e5%88%a5/%e8%bb%9f%e9%ab%94%e7%ad%86%e8%a8%98/ios8-%e4%b8%8b%e5%ae%9a%e4%bd% 8d-cllocationmanager-%e7%9a%84%e6%94%b9%e8%ae%8a/http://www.cocoachina.com/ask/questions/show/113705/ Cllocationmanager%e8%8e%b7%e5%8f%96%e5%9c%b0%e5%9d%80%e5%81%8f%e5%b7%ae
??In addition, this is the IOS8 application push permission has changed, and its API has changed? Please note, do not repeat here.??

**************************************************************************

?

Other peripheral issues can refer to my series of articles:<#iphone6 of the old project and Iphone6plus adaptation #> (ongoing update)

Series: #iphone6 and Iphone6plus for Old projects # (continuous update, updated on Sunday October 12, 2014)

The list is as follows:

?

1. #iphone6 and iphone6plus adaptation of the old project #launchimage

2. #iphone6 and iphone6plus adaptation of the old project #icon

3. #iphone6 and iphone6plus adaptation of the old project #ios8 unable to open the location problem remember # solutions #

? 4. #iphone6 of the old project in Iphone6plus adaptation #iphone6 resolution and adaptation

5.iOS Device Screen Pixel overview

6. #iPhone6与iPhone6Plus适配 # How to create a PCH file in Xcode 6

**************************************************************************


The permanent address of this article is http://www.cnblogs.com/ChenYilong/p/4020359.html, please specify the source of the reprint.

#iphone6 and iphone6plus adaptation of the old project #ios8 unable to open location problems and # solutions #

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.