ios8中百度推送接收不到

时间:2014-10-28 17:52:30   收藏:0   阅读:296

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 )];


原文:http://blog.csdn.net/alincexiaohao/article/details/40541999

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!