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

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

问题描述

我正在按照本教程尝试向我的聊天应用添加推送通知: https://www.appcoda.com/firebase-push-notifications/

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:

和项目->代码签名:

权利文件:

当我运行该项目时,它成功了,然后说可执行文件已使用无效的权利进行了签名".完全错误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).

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!

其他信息

使用Xcode 8.2.1

Using Xcode 8.2.1

  • 在开发人员门户的我的应用程序ID"中,启用了游戏中心",应用程序内购买"和推送通知".据我了解,默认情况下会启用Game Center和IAP.
  • 我尝试过打开GC和IAP,然后再次关闭.重新启动Xcode,清理,构建.没有运气
  • 我尝试打开GC和IAP,然后重新生成我的配置文件,进行安装,清洁和构建.没有运气.
  • 我的捆绑包ID随处可见.

推荐答案

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

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

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

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

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

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天全站免登陆