码迷,mamicode.com
首页 > 移动开发 > 详细

registerForRemoteNotificationTypes: is not supported in iOS 8.0 and later

时间:2014-10-20 21:24:22      阅读:226      评论:0      收藏:0      [点我收藏+]

标签:ios8推送   devicetoken报错   apns   

#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 80000
if ([application respondsToSelector:@selector(registerUserNotificationSettings:)]) {
    // use registerUserNotificationSettings
} else {
    // use registerForRemoteNotifications
}
#else
// use registerForRemoteNotifications

#endif

If you are only using Xcode 6 (beta), you can stick with just this:

if ([application respondsToSelector:@selector(registerUserNotificationSettings:)]) {
    // use registerUserNotificationSettings
} else {
    // use registerForRemoteNotifications
}

registerForRemoteNotificationTypes: is not supported in iOS 8.0 and later

标签:ios8推送   devicetoken报错   apns   

原文地址:http://blog.csdn.net/hxl188/article/details/40315471

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!