关于salesforce推送:
SDK已经更新的到8.0了,所以推送注册时候的方法跟随SDK升级
上代码:
在didFinishLaunchingWithOptions中实现:
//Register remote notifaction
UIUserNotificationType types =
UIUserNotificationTypeBadge|
UIUserNotificationTypeSound|
UIUserNotificationTypeAlert;
UIUserNotificationSettings *mySettings = [UIUserNotificationSettings settingsForTypes:types categories:nil];
[application registerUserNotificationSettings:mySettings];
[[UIApplication sharedApplication] registerForRemoteNotifications];
在didRegisterForRemoteNotificationsWithDeviceToken实现
[[SFPushNotificationManager sharedInstance] didRegisterForRemoteNotificationsWithDeviceToken:deviceToken]
此函数可以输出device
下一步获得推送过来的消息
在didReceiveRemoteNotification中获得,然后进行处理
最后选择好证书,就可以收到通知!