首页 > 代码库 > ios8中百度推送接收不到
ios8中百度推送接收不到
ios8中百度推送接收类型会有所改变:
//消息推送注册
if ([[[UIDevicecurrentDevice] systemVersion]floatValue] >= 8.0)
{
[[UIApplicationsharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings
settingsForTypes:(UIUserNotificationTypeSound |UIUserNotificationTypeAlert | UIUserNotificationTypeBadge)
categories:nil]];
[[UIApplicationsharedApplication] registerForRemoteNotifications];
}
else{
[[ UIApplicationsharedApplication ] registerForRemoteNotificationTypes :(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound |UIRemoteNotificationTypeAlert )];
}
//取消推送
[[ UIApplication sharedApplication ] registerForRemoteNotificationTypes :(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound |UIRemoteNotificationTypeAlert )];
ios8中百度推送接收不到