您的位置:首页 > 移动开发 > IOS开发

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

?
?
?
?
还有推送插件开发



内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: