xcode 推送通知的代码签名权利无效 (ITMS 90046)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/28221001/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 06:33:52  来源:igfitidea点击:

Invalid Code Signing Entitlements for push notification (ITMS 90046)

xcode

提问by Abhishek Ghuwalewala

I am getting an error when trying to submit an update to my iPhone app through Application Loader. I have not changed anything in the configuration since I did the last update, so I am not sure why it's complaining now.

尝试通过 Application Loader 向我的 iPhone 应用程序提交更新时出现错误。自从上次更新以来,我没有对配置进行任何更改,所以我不确定为什么它现在会抱怨。

I have tried refreshing my provisioning profiles in Xcode and also tried to explicitly set the Provisioning Profile in project's Build Settings. When explicitly set the Provisioning Profile in Build Setting and then do Archive, Xcode complains that "No matching code signing identities" for the selected provisioning profile were found. When I do Fix Issue, Xcode resets the Provisioning Profile in Build Settings back to Automatic and Code Signing Identity to iPhone Developer.

我尝试在 Xcode 中刷新我的配置文件,并尝试在项目的构建设置中显式设置配置文件。当在 Build Setting 中明确设置 Provisioning Profile 然后执行 Archive 时,Xcode 会抱怨找到所选配置文件的“No matching code signature identities”。当我修复问题时,Xcode 将 Build Settings 中的 Provisioning Profile 重置回 Automatic and Code Signing Identity to iPhone Developer。

I have also tried to do a clean build, Alt + Clean to clean the build folder, restarted Xcode multiple times, and did a Delete on Derived Data in Organizer > Projects, but nothing has helped.

我还尝试进行清理构建,Alt + Clean 清理构建文件夹,多次重新启动 Xcode,并在管理器 > 项目中删除派生数据,但没有任何帮助。

"ERROR ITMS-90046: "Invalid Code Signing Entitlements. Your applications bundle's signature contains code signing entitlements that are not supported on iOS. Specifically, value 'development' for key 'aps-environment' in '...' is not supported."

“错误 ITMS-90046:”无效的代码签名权利。您的应用程序包的签名包含 iOS 不支持的代码签名权利。具体来说,不支持 '...' 中关键 'aps-environment' 的值 'development'。”

When I try to submit the Archive after Xcode automatically resets Code Signing Identity to iPhone Developer, I get the following error.

当我在 Xcode 自动将代码签名身份重置为 iPhone 开发人员后尝试提交存档时,出现以下错误。

I could try to revoke the Distribution certificate, but I am not sure what's the consequences will be. On Apple's website it says that revoking a certificate doesn't impact existing apps in the store, but I am concerned if there are any other unintended impact of this that I haven't thought about.

我可以尝试撤销分发证书,但我不确定后果会是什么。在 Apple 的网站上,它说撤销证书不会影响商店中现有的应用程序,但我担心是否还有其他我没有考虑过的意外影响。

"Failed to locate or generate matching signing assets: Xcode attempted to locate or generate matching signing assets and failed to do so because of the following issues -- Your account already has a valid iOS Distribution certificate. If you have your signing identity on another Mac, you can import a developer profile. You can also revoke the current certificate and request one again."

“无法定位或生成匹配的签名资产:Xcode 尝试定位或生成匹配的签名资产,但由于以下问题而失败——您的帐户已经拥有有效的 iOS 分发证书。如果您在另一台 Mac 上拥有您的签名身份,您可以导入开发者配置文件。您也可以撤销当前证书并重新申请。”

Any help would be greatly appreciated.

任何帮助将不胜感激。

回答by abinop

Try to do a Product->Clean and then make sure that the Provisioning profile and Code signing identities are correct.

尝试执行 Product->Clean,然后确保 Provisioning 配置文件和代码签名标识正确。

code signing details

代码签名细节

回答by sigot

I found this problem because I tried to chnage the bundle id many time during development. It was solve with check the build setting>product bundle identifier and correct the name same as bundle id. I think the xcode not replace this new the newest bundle id. I hope this help

我发现这个问题是因为我在开发过程中多次尝试更改包 ID。通过检查构建设置>产品包标识符并更正与包ID相同的名称来解决。我认为 xcode 不会替换这个新的最新包 ID。我希望这有帮助

回答by DrMickeyLauer

While ideally Xcode should figure this out automatically and override the default 'development' aps-enviroment, in reality it often doesn't work.

虽然理想情况下 Xcode 应该自动解决这个问题并覆盖默认的“开发” aps 环境,但实际上它通常不起作用。

The easiest way out of this nightmare is to copy your entitlements file, name it Release.entitlements –?and make it known to the build settings.

摆脱这个噩梦的最简单方法是复制您的权利文件,将其命名为 Release.entitlements –? 并使构建设置知道它。

This fixed it for me.

这为我修好了。