iOS (push remote push) upgraded to iOS8 system Some programs do not receive remote push

Source: Internet
Author: User

Maintenance of a program, when the phone upgrade to iOS8 can not receive a remote push, display registration failure, check the information, the original is not to obtain user permission, add a method to try the next, OK

if ([[[[Uidevice currentdevice]systemversion]integervalue] >= 8) {                uiusernotificationsettings*setting = [ Uiusernotificationsettings settingsfortypes:uiusernotificationtypealert| uiusernotificationtypebadge| Uiusernotificationtypesound Categories:nil];        [Application registerusernotificationsettings:setting];        [Application registerforremotenotifications];            } else{                [Application registerforremotenotificationtypes:uiremotenotificationtypealert| uiremotenotificationtypebadge| Uiremotenotificationtypesound];            }

The registration method used for different versions of the system is not the same, the following is the instructions given by the Apple SDK:

-(void) Registerforremotenotificationtypes: (uiremotenotificationtype) Types Ns_deprecated_ios (3_0, 8_0, <span style= "COLOR: #FF0000;" > "Please use Registerforremotenotifications and registerusernotificationsettings:instead" </span>);




iOS (push remote push) upgraded to iOS8 system Some programs do not receive remote push

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.