(Optional) Subscribe for Apple Push Notifications (APNS).
Use the Apple Push Notification service to propagate information from the backend to the device. Enable APNS for iOS applications using the native iOS push services.
For more information on how to enable certificate for APNS, see Apple Web site: http://developer.apple.com/xcode/
Add the push certificate to Push Configurations tab in SCC.
For more information, see Configuring Native Notifications in SAP Control Center for SAP Mobile Platform.
Exchange device token using setConfigProperty method
-(void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken { NSString *devToken=[[[NSString alloc]initWithData:deviceToken encoding:NSUTF8StringEncoding]autorelease]; NSLog(@"Device Token: %@",devToken); } -(void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error { NSLog(@"Error Occurred: %@",[error description]); }
NSError* error = nil; NSDictionary *props = [NSMutableDictionary dictionary]; [props setValue:deviceToken forKey:@"d:ApnsDeviceToken"]; [appSettings setConfigProperty:props error:&error]; if (error) { NSLog(@"ERROR: %@",error); }