iOS10 推送最新配置
2016-09-22 10:28
302 查看
iOS10全新方法实现推送+deviceToken无法获取或无效的解决
Xcode 8和iOS10正式版出来后,这个方法做了修改,也是之前也没发现这个参数有啥用:UNNotificationCategory *category1 = [UNNotificationCategory categoryWithIdentifier:@"Category1" actions:@[action2,action1] minimalActions:@[action2,action1]
intentIdentifiers:@[@"action1",@"action2"] options:UNNotificationCategoryOptionCustomDismissAction];
改成了:去掉了minimalActions:
UNNotificationCategory *category1 = [UNNotificationCategory categoryWithIdentifier:@"Category1" actions:@[action2,action1] intentIdentifiers:@[@"action1",@"action2"]
options:UNNotificationCategoryOptionCustomDismissAction];
在开始之前需要打开一个推送开关,不然无法获取deviceToken,老项目或者出现deviceToken无效的情况。
或许还应该打开这个
新增了UserNotifications Framework
?
相关文章推荐
- iOS10 推送最新特性研究
- iOS10推送项目配置
- DirectX5.0最新游戏编程指南 DirectDraw教程篇 一、配置DirectX SDK
- (转载)配置最新的PHP加MYSQL服务器
- 配置最新的PHP加MYSQL服务器
- 用拖拉实现设备驱动配置(EsayHMI最新驱动配置方式)
- Apache+php+mysql在windows下的安装与配置图解(最新版
- 最新配置
- 配置最新的PHP加MYSQL服务器
- 最新postfix的main.cf配置参考
- 用拖拉实现设备驱动配置(EsayHMI最新驱动配置方式)
- 配置最新的PHP加MYSQL服务器
- Apache HTTP最新官方配置(中译版)
- Apache、php、mysql在windows下的安装与配置图解(最新版)
- Redhat Linux9.0下最新web服务器环境配置指南withPHP5,Apache2.0.47(转载)
- Apache HTTP最新官方配置(中译版)
- Apache HTTP最新官方配置(中译版[1])
- Apache HTTP最新官方配置(中译版[4])
- windows 下配置 apache 2.2.3+php 5.1.3+mysql 5.0.24+zend 3.0.1最新配置
- 在线测试电脑配置--看看你的电脑能玩最新的游戏么!