推送通知IOS
我有这个错误:
错误:错误域=NSCocoaErrorDomain Code=3000“找不到应用程序的有效“aps-environment”权利字符串”UserInfo=0x18cb70 {NSLocalizedDescription=没有找到应用程序的有效“aps-environment”权利字符串}
我无法弄清楚这一点。我做了一切。我重新安装了证书一千次,但我仍然有这个错误。我已经在 Entitlements.plist 文件中设置了 aps-environment。我的 Apple 开发推送证书位于钥匙串中。配置文件已启用推送通知。我已经设置了正确的捆绑包。我能做什么。我需要解决方案。谢谢。
I have this error:
Error: Error Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment' entitlement string found for application" UserInfo=0x18cb70 {NSLocalizedDescription=no valid 'aps-environment' entitlement string found for application}
I can't figure this out. I did everything.I reinstalled the certificates a thousand times and this i still have this error.I have set aps-environment in the Entitlements.plist file.My Apple Development Push Certificate is in the keychain. The provisioning profiles has the push notification enabled. I have set the correct bundle. What can i do.I need solutions.Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我在许多 APNS 问题的答案中没有看到的一件事是:
如果您的项目有多个目标,请确保您选择正在运行的目标并更改该目标中的代码签名身份!
One thing I've not seen in the answers to many of the APNS questions is:
If your project has multiple targets, make sure you are selecting the target you are RUNNING and changing the Code Signing Identity in that target !
很简单,
,删除旧的配置文件并
在应用程序 ID 中启用推送后
创建新的配置文件。这肯定会起作用。
Simple,
Delete the old provisioning profile and
Create a new provisioning file, after you enable push in the App ID.
This will work for sure.
我曾经看到过这个...这是我修复它的方法:
您应该有一个完整的 AppId (不是通配符)。如果是 XXXXXX.*,您应该创建一个新的 AppId,使其变为 XXXXXX.com.example.YourApp,为其生成配置文件,并使用它来签署您的应用程序。
I saw this once... here's what I did to fix it:
You should have a full AppId (not a wildcard one). If it's XXXXXX.*, you should create a new AppId so that it becomes XXXXXX.com.example.YourApp, generate a profile for it, and use it to sign your app.
在构建应用程序之前,请检查以下几点:
打开您用于在 TextEdit 中构建应用程序的临时配置文件。
确保临时配置文件包含键:“aps-environment”。根据配置文件的环境,它可以有 2 个值,即“开发”和“生产”。如果没有,那么您必须通过将 APNS 证书添加到其 AppId 来创建新的临时配置文件。
如果上述情况均已完成,则尝试构建应用程序。希望这有帮助。
Check below points before you build an application:
Open your provisional profile which you are using to build the app in TextEdit.
Make sure that provisional profile consists of key: "aps-environment". It can have 2 values i.e., "development" and "production" based upon the environment of the profile. If not then you have to make new provisional profile by adding APNS certificate to its AppId.
If the above things on place then try to build the app. Hope this helps.