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