使用 Xcode 8 找不到有效的“aps-environment”权利字符串
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/39713154/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
with Xcode 8 no valid 'aps-environment' entitlement string found
提问by GJain
I installed Xcode 8. Since then I am getting
我安装了 Xcode 8。从那时起我得到了
application:didFailToRegisterForRemoteNotificationsWithError:, Thread [{number = 1, name = main}] error [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}]
application:didFailToRegisterForRemoteNotificationsWithError:, Thread [{number = 1, name = main}] 错误 [Error Domain=NSCocoaErrorDomain Code=3000“没有为应用程序找到有效的 'aps-environment' 授权字符串” UserInfo={NSLocalizedDescription=no valid 'aps-为应用程序找到的环境'权利字符串}]
I tried downloading and double-clicking provisioning files again. It did not work.
我再次尝试下载并双击配置文件。这没用。
I did check that push notifications are enabled for provisioning files.
我确实检查了是否为配置文件启用了推送通知。
I even logged out of Xcode account and logged in again...did not help.
我什至注销了 Xcode 帐户并再次登录...没有帮助。
Which setting I might be missing for Xcode8/ios10?
对于 Xcode8/ios10,我可能缺少哪个设置?
It was working for Xcode 7.3/ios9/8.
它适用于 Xcode 7.3/ios9/8。
Please help.
请帮忙。
回答by ADITYA MISHRA
Please enable the push notification toggle , make it ON, in the capabilities section (Next to project section)
请在功能部分(项目部分旁边)启用推送通知切换,将其设为 ON
回答by Andy G
One more thing... Check that you enable Push notifications for PROPER configuration. I've wasted around an hour trying to figure out what's going on with pushes on DEBUG with permanent NO APS entitlement. But pushes was enabled ONLY in RELEASE.
还有一件事......检查您是否为正确配置启用了推送通知。我浪费了大约一个小时试图弄清楚在永久无 APS 权利的情况下推动 DEBUG 发生了什么。但推送仅在 RELEASE 中启用。