ios--Aurora Push

Source: Internet
Author: User

1.SDK Integration

You can refer to the documentation for the specific library certificate that you need to import the Aurora network.

2. Implement push

Note that when the program is in the foreground, the received push will not be displayed, but the data can be received, we need to print

-  (BOOL) Application: (uiapplication *) Application didfinishlaunchingwithoptions: (NSDictionary  *) launchoptions {    //  Aurora Push     float  systemversion = [[uidevice currentdevice].systemversion floatvalue];     if  (systemversion >= 8.0)  {        // You can add a custom categories        [apservice  Registerforremotenotificationtypes: (uiusernotificationtypebadge |                                                          uiusernotificationtypesound  |                                                         uiusernotificationtypealert)                                               categories:nil];    } else {         //categories  must be a nil        [apservice  Registerforremotenotificationtypes: (uiremotenotificationtypebadge |                                                          UIRemoteNotificationTypeSound |                                                          uiremotenotificationtypealert)                                              categories:nil];    }         // required    [apservice setupwithoption:launchoptions] ;} #pragma  mark -  Registration device Push-(void) application: (uiapplication *) application  Didregisterforremotenotificationswithdevicetoken: (nsdata *) Devicetoken{    [apservice  registerdevicetoken:devicetoken];} #pragma  mark  Push message receive-  (void) application: (uiapplication *) application  Didreceiveremotenotification: (nsdictionary *) userinfo {       //  Required    [APService handleRemoteNotification:userInfo];     nslog (@ "appdelegate:%@", UserInfo);   }-  (void) application: (uiapplication *) Application didreceiveremotenotification: (nsdictionary *) Userinfo fetchcompletionhandler: (void   (^) (uibackgroundfetchresult)) completionhandler {             // IOS 7 Support Required    [APService  handleremotenotification:userinfo];     completionhandler (Uibackgroundfetchresultnewdata);     nslog (@ " appdelegate:%@ ", userInfo);    }


ios--Aurora Push

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.