我正在使用 Xcode8、swift 3、iOS 10
在 Targets -> capabilities 中显示“将推送通知功能添加到您的应用程序 ID”。
我检查了我的 APP ID,它显示在开发和分发中都启用了推送通知。
使用相同的 APP IS 和证书,我在 iOS9 中收到通知,但在 iOS 10 中我收到错误
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}
并且还显示红色标记(问题)
最佳答案
我重新启动了 XCode,它消失了:-)
关于ios - 为什么 "add Push notification feature to your app id"警告甚至在 App ID 中显示启用推送通知后?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40505216/