registerForRemoteNotificationTypes: is not supported in iOS 8.0 and
注册模式:
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0) {
[[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings
settingsForTypes:(UIUserNotificationTypeSound |
UIUserNotificationTypeAlert |
UIUserNotificationTypeBadge)
categories:nil]];
[[UIApplication sharedApplication] registerForRemoteNotifications];
}
else {
[[UIApplication sharedApplication]registerForRemoteNotificationTypes:UIRemoteNotificationTypeAlert|
UIRemoteNotificationTypeBadge|
UIRemoteNotificationTypeSound];
}
同理推断消息推送是否打开也有变化
UIRemoteNotificationType types;
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)
types = [[UIApplication sharedApplication] currentUserNotificationSettings].types;
else
types = [[UIApplication sharedApplication] enabledRemoteNotificationTypes];
return (types & UIRemoteNotificationTypeAlert);
版权声明:本文博客原创文章,博客,未经同意,不得转载。
registerForRemoteNotificationTypes: is not supported in iOS 8.0 and的更多相关文章
- registerForRemoteNotificationTypes: is not supported in iOS 8.0 and later
本文转载至 http://bbs.csdn.net/topics/390889517 IOS8 PUSH解决方法 昨天晚上整理PUSH的东西,准备些一个教程,全部弄好之后,发现没有达到预期的效果,本以 ...
- iOS iOS8中 问题"registerForRemoteNotificationTypes: is not supported in iOS 8.0 and later" 解决方式
问题重述: iOS 8中改变了通知注冊的方式,假设App须要同一时候支持iOS 7 和 8 的话,须要首先检查selector. 解决方式:在Xcode 6中 - (BOOL)application: ...
- embedded dylibs/frameworks are only supported on iOS 8.0 and later 错误解决
ld: warning: embedded dylibs/frameworks only run on iOS 8 or later ld: embedded dylibs/frameworks ar ...
- iOS开发Embedded dylibs/frameworks are only supported on iOS 8.0 and later for architecture armv7的解决方法
全局搜索IPHONEOS_DEPLOYMENT_TARGE改为更小的版本
- iOS 10.0 更新点(开发者视角)
html, body {overflow-x: initial !important;}html { font-size: 14px; } body { margin: 0px; padding: 0 ...
- HierarchyViewer for iOS 2.0 BETA Introduction
We know HierarchyViewer is an useful tool in Android SDK. The developer and tester, who haven't the ...
- iOS 7.0获取iphone UDID 【转】
iOS 7.0 iOS 7中苹果再一次无情的封杀mac地址,使用之前的方法获取到的mac地址全部都变成了02:00:00:00:00:00.有问题总的解决啊,于是四处查资料,终于有了思路是否可以使用K ...
- iOS 5.0 后UIViewController新增:willMoveToParentViewController和didMoveToParentViewCon[转]
在iOS 5.0以前,我们在一个UIViewController中这样组织相关的UIView 在以前,一个UIViewController的View可能有很多小的子view.这些子view很多时候 ...
- iOS 5.0 后UIViewController新增:willMoveToParentViewController和didMoveToParentViewCon
在iOS 5.0以前,我们在一个UIViewController中这样组织相关的UIView 在以前,一个UIViewController的View可能有很多小的子view.这些子view很多时候 ...
随机推荐
- hdu4738(割桥)
找人去炸边,炸完之后分成两个连通块(炸割桥) 每条边上有w个守卫,派去炸桥的人不能比守卫少 所以, 如果原本不连通,那么输出0 如果没有桥,输出-1 如果有桥没有守卫,那么是输出1,而不是0(tric ...
- ActiveMQ相关背景(转)
概述 介绍中间件.MOM.JMS.ActiveMQ,及相互的关系. 中间件 由于业务的不同.技术的发展.硬件和软件的选择有所差别,导致了异构组件或应用并存的局面.要使这些异构的组件协同工作,一个有效的 ...
- Codeforces Round #256 (Div. 2) D. Multiplication Table(二进制搜索)
转载请注明出处:viewmode=contents" target="_blank">http://blog.csdn.net/u012860063?viewmod ...
- Oracle SQL Lesson (6) - 使用Join进行联合查询
使用连接SQL 1999SELECT table1.column, table2.columnFROM table1[NATURAL JOIN table2] |[JOIN table2 USING ...
- JDBC批处理executeBatch
JDBC运行SQL声明,有两个处理接口,一PreparedStatement,Statement,一般程序JDBC有多少仍然比较PreparedStatement 只要运行批处理,PreparedSt ...
- Java多线程的wait(),notify(),notifyAll()
在多线程的情况下.因为多个线程与存储空间共享相同的过程,同时带来的便利.它也带来了访问冲突这个严重的问题. Java语言提供了一种特殊的机制来解决这类冲突,避免同一数据对象由多个线程在同一时间访问. ...
- 3Dmax+blend+WPF综合运用
原文:3Dmax+blend+WPF综合运用 赛后总结 本人小菜,WPF刚入门,只是写一下最近的项目心得.欢迎各位前辈们前来拍砖指正,感激不敬!先申明,小弟我入门仓促,很多东西也是一知半解,所以很多问 ...
- Blend4精选案例图解教程(一):丰富的形状(Shape)资源
原文:Blend4精选案例图解教程(一):丰富的形状(Shape)资源 Blend4资源面板中内置了丰富的形状素材,为我们在构建程序时提供极大的方便.系统默认内置18种常用形状,通过其属性设置可以自定 ...
- Java Web整合开发(附录1) - 安装配置环境
1. Install JDK http://blog.csdn.net/sonnet123/article/details/9169741 Download JDK http://www.oracle ...
- virtio-netdev 发送数据包
在前面几文中已经大体介绍了virtio的重要组成,包含virtio net设备的创建,vring的创建,与virtio设备的交互方式.我们就从网络数据包的发送角度来看下virtio的详细使用流程. [ ...