ios8中百度推送接收不到

ios8中百度推送接收类型会有所改变:

//消息推送注冊

    if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)

    {

        [[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings

                                                                             settingsForTypes:(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge)

                                                                             categories:nil]];

        [[UIApplication sharedApplication] registerForRemoteNotifications];

    }

    else{

        [[ UIApplication sharedApplication ] registerForRemoteNotificationTypes :( UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert )];

    }


//取消推送

[[ UIApplication sharedApplication ] registerForRemoteNotificationTypes :( UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert )];


posted @ 2016-03-09 12:30  zfyouxi  阅读(178)  评论(0编辑  收藏  举报