Problems encountered after using XCODE6 and IOS8SDK

Source: Internet
Author: User

  1. positioning . Apple has modified the location authorization protocol in IOS8, which means that your original app will probably not be able to locate on iOS8. The best way to do this is to call IOS8 's location authorization API to get the user's authorization when the app is launched, so don't make any changes elsewhere.
    if (osversion>=8.0) {        *clloc = [[Cllocationmanager alloc] init];        [Clloc requestalwaysauthorization]; }

    In addition to the above code, you also need to add two attribute nslocationalwaysusagedescription,nslocationwheninusedescription in the app's plist file. The value of these two properties can be customized or not.

  2. Modification of the message push API. Originally we only need to call Registerforremotenotificationtypes This method is possible, but in the IOS8 need to first configure and then register, That is, call Registerusernotificationsettings first and then call the Registerforremotenotificationtypes method.
    if(osversion>=8.0){//8.0 Use this method to register push notifications laterUiusernotificationsettings *settings = [Uiusernotificationsettings settingsfortypes:uiusernotificationtypebadge| uiusernotificationtypesound|Uiusernotificationtypealert Categories:nil];                [[UIApplication sharedapplication] registerusernotificationsettings:settings]; Uiremotenotificationtype Mytypes= Uiremotenotificationtypebadge | Uiremotenotificationtypealert |Uiremotenotificationtypesound;    [[UIApplication sharedapplication] registerforremotenotificationtypes:mytypes]; }Else{[[UIApplication sharedapplication] registerforremotenotificationtypes: (Uiremotenotificationtypealert| Uiremotenotificationtypesound |Uiremotenotificationtypebadge)];}

  3. Before IOS8, Apple allowed us to add description properties to a custom class, but it was not possible after IOS8. This can only be achieved by overriding the description get method.

Problems encountered after using XCODE6 and IOS8SDK

Related Article

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.