无法注册远程通知

Him*_*nth 4 xcode push-notification ios remote-notifications

将Xcode版本更新为8.0后,我收到此错误.在尝试注册远程通知时,我可以在我的日志中看到这样的内容

 Error Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment' entitlement string found for application" UserInfo={NSLocalizedDescription=no valid 'aps-environment' entitlement string found for application}, no valid 'aps-environment' entitlement string found for application
Run Code Online (Sandbox Code Playgroud)

我尝试了一些与我的问题相关的Stack Overflow答案,但无法解决这个问题.

1.处理新的临时简介

2.删除并重新安装应用程序

3.手动设置临时配置文件.

以上任何一项都没有帮助我解决.

请给我一些建议.提前致谢.

rma*_*ddy 14

我最近遇到了同样的问题.经过一些非显而易见的搜索后,我发现在iOS 10和Xcode 8下,您现在需要为目标启用推送通知功能.

在Xcode中,选择您的目标.转到功能选项卡.启用推送通知功能.