iOS推送通知获取不到deviceToken
作者:
迷路的小小 | 来源:发表于
2019-11-02 13:54 被阅读0次
1. 确保证书没有问题
2. 确保推送已经注册
UIUserNotificationType myType = UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge;
UIUserNotificationSettings *settings = [UIUserNotificationSettings settingsForTypes:myType categories:nil];
[[UIApplication sharedApplication] registerUserNotificationSettings:settings];
[[UIApplication sharedApplication] registerForRemoteNotifications];
3. 删除所有证书
- 命令行
cd ~/Library/MobileDevice/Provisioning\ Profiles/
命令行 rm *
- 注意一定要选择好描述文件,选对了就能对消息证书
本文标题:iOS推送通知获取不到deviceToken
本文链接:https://www.haomeiwen.com/subject/sfncbctx.html
网友评论