添加推送通知时无效的权利错误 [英] Invalid entitlements error when adding push notifications

查看:31
本文介绍了添加推送通知时无效的权利错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试按照本教程向我的聊天应用程序添加推送通知:

我的配置文件设置了推送通知:

我下载了它,然后双击它进行安装.

对于代码签名,在目标中 -> 代码签名:

和项目 -> 代码签名:

权利文件:

当我运行该项目时,它成功了,然后说可执行文件的签名无效".完整错误 在您的应用程序的代码签名权利文件中指定的权利无效、不被允许或与您的配置文件中指定的权利不匹配.(0xE8008016).

感谢阅读.. 对此的任何帮助将不胜感激!

附加信息

使用 Xcode 8.2.1

  • 在开发者门户的我的 App ID 中,启用了游戏中心、应用内购买和推送通知.我的理解是默认启用 Game Center 和 IAP.
  • 我已尝试打开 GC 和 IAP,然后再次关闭.重新启动 Xcode,清理,构建.没有运气
  • 我已尝试打开 GC 和 IAP,然后重新生成我的配置文件、安装它们、清理和构建.没有运气.
  • 我的 Bundle ID 到处都匹配.

解决方案

删除授权文件中所有未由您添加的未知条目.

例如:您可以从您的权利文件中删除 keychainAccessGroup 条目,如果它不是您有意添加的.

查看您的测试目标,测试和主要目标的团队标识符应该相同.礼貌:https://stackoverflow.com/a/40464055/2959346

I'm trying to add push notifications to my chat app following this tutorial: https://www.appcoda.com/firebase-push-notifications/

I've toggled Push Notifications to On in "Capabilities":

My provisioning profile is set up for push notifications:

I downloaded it, and double clicked it to install.

For Code Signing, in Target -> Code Signing:

And Project -> Code Signing:

Entitlements file:

When I ran the project it succeeded, then said "The executable was signed with invalid entitlements". Full error The entitlements specified in your application’s Code Signing Entitlements file are invalid, not permitted, or do not match those specified in your provisioning profile. (0xE8008016).

Thanks for reading.. Any help on this will be hugely appreciated!

EDIT: Additional Information

Using Xcode 8.2.1

  • In my App ID in the developers portal, Game Center, In-App Purchases, and Push Notifications are enabled. It's my understanding that Game Center and IAP are enabled by default.
  • I've tried turning GC and IAP On, and then Off again. Restart Xcode, clean, build. No luck
  • I've tried turning GC and IAP On, then regenerating my provisioning profiles, installing them, cleaning and building. No luck.
  • My Bundle ID matches everywhere.

解决方案

Delete any unknown entries in entitlements file, which are not added by you.

Example: you can delete keychainAccessGroup entry from your entitlements file, if that is not added by you intentionally.

Have a look at your test target, the Team identifier should be same for both Test and Main target. Courtesy: https://stackoverflow.com/a/40464055/2959346

这篇关于添加推送通知时无效的权利错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆