ios 错误 ITMS-90164/90046:无效的代码签名权利
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/28106791/
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
ERROR ITMS-90164/90046: Invalid Code Signing Entitlements
提问by yonasstephen
Note: I'm developing using Xamarin. Similar question posted in Xamarin Forum here
注意:我正在使用 Xamarin 进行开发。类似的问题张贴在Xamarin论坛在这里
I'm creating an app called, say CompanyApp. Then I created an App ID for it com.Company.CompanyApp, along with Distribution Provisioning Profile that uses the corresponding App ID. I uploaded the binary and it worked perfectly fine.
我正在创建一个名为CompanyApp的应用程序。然后我为它创建了一个 App ID com.Company.CompanyApp,以及使用相应 App ID 的 Distribution Provisioning Profile。我上传了二进制文件,它运行得非常好。
Then I went on create a demo version of the app (basically the same app with small modification, so it's the same solution & project, just different bundle signing setting), CompanyAppDemowith a new App ID com.Company.CompanyAppDemo, along with a new Distribution Provisioning Profile that uses the new App ID. I updated the iOS Bundle Signing options to use the new Provisioning Profile and generated the IPA. But when I uploaded this to Application Loader, I got the following error:
然后我继续创建该应用程序的演示版本(基本上是相同的应用程序,只是做了一些小改动,所以它是相同的解决方案和项目,只是不同的包签名设置),CompanyAppDemo和一个新的应用程序 ID com.Company.CompanyAppDemo,以及一个使用新 App ID 的新分发配置文件。我更新了 iOS 捆绑签名选项以使用新的配置文件并生成 IPA。但是当我将其上传到 Application Loader 时,出现以下错误:
[2015-01-23 16:08:21 SGT] ERROR: ERROR ITMS-90164: "Invalid Code Signing Entitlements. The entitlements in your app bundle signature do not match the ones that are contained in the provisioning profile. According to the provisioning profile, the bundle contains a key value that is not allowed: 'TEAMID.com.Company.CompanyApp' for the key 'application-identifier' in 'Payload/CompanyApp.app/CompanyApp'"
[2015-01-23 16:08:21 SGT] ERROR: ERROR ITMS-90046: "Invalid Code Signing Entitlements. Your application bundle's signature contains code signing entitlements that are not supported on iOS. Specifically, value 'TEAMID.com.Company.CompanyApp' for key 'application-identifier' in 'Payload/CompanyApp.app/CompanyApp' is not supported. This value should be a string starting with your TEAMID, followed by a dot '.', followed by the bundle identifier."
[2015-01-23 16:08:21 SGT] 错误:错误 ITMS-90164:“无效的代码签名权利。您的应用程序包签名中的权利与供应配置文件中包含的权利不匹配。根据供应配置文件中,捆绑包包含不允许的键值:“Payload/CompanyApp.app/CompanyApp”中键“application-identifier”的“TEAMID.com.Company.CompanyApp”
[2015-01-23 16:08:21 SGT] 错误:错误 ITMS-90046:“无效的代码签名权利。您的应用程序包的签名包含 iOS 不支持的代码签名权利。具体来说,值 'TEAMID.com.Company 'Payload/CompanyApp.app/CompanyApp' 中的键 'application-identifier' 的 .CompanyApp' 不受支持。该值应该是一个以您的 TEAMID 开头的字符串,后跟一个点 '.',然后是包标识符。
I have been debugging for days to figure out to no avail.
我已经调试了好几天才发现无济于事。
I am wondering why when I signed with the new profile, the error that Application Loader threw refer to the ID of the original TEAMID.com.Company.CompanyAppinstead of TEAMID.com.Company.CompanyAppDemo? Is this a bug in Xamarin that pick up a wrong provisioning profile or am I missing something? You don't need different certificate for different app right?
我想知道为什么当我使用新配置文件签名时,Application Loader 抛出的错误是指原始TEAMID.com.Company.CompanyApp的 ID而不是TEAMID.com.Company.CompanyAppDemo?这是 Xamarin 中获取错误配置文件的错误还是我遗漏了什么?不同的应用程序不需要不同的证书,对吗?
Note that I have always refreshed the Provisioning Profile list in XCode > Preference before changing the iOS Build Signing option in Xamarin.
请注意,在更改 Xamarin 中的 iOS 构建签名选项之前,我总是在 XCode > 首选项中刷新配置文件列表。
采纳答案by yonasstephen
Finally after 2 weeks of hair pulling..
终于在拔毛2周后..
For some reasons, if there is no key 'application-identifier' in the Entitlements.plist that is set to TEAMID.com.Company.CompanyAppDemo, Xamarin will use the original application-identifier, i.e. TEAMID.com.Company.CompanyApp
由于某些原因,如果 Entitlements.plist 中没有设置为TEAMID.com.Company.CompanyAppDemo 的关键“application-identifier” ,Xamarin 将使用原始应用程序标识符,即TEAMID.com.Company.CompanyApp
So the solution was to add application-identifier specifying the correct application bundle ID inside Entitlements.plist. Then include the plist in the Build Options > iOS Bundle Signing.
因此,解决方案是在 Entitlements.plist 中添加指定正确应用程序包 ID 的应用程序标识符。然后在 Build Options > iOS Bundle Signing 中包含 plist。
回答by quarac
If someone gets here by searching for ERROR ITMS-90046 like me, my solution was to Clean it and delete all precompiled frameworks (the custom ones) and then build again.
如果有人像我一样通过搜索 ERROR ITMS-90046 到达这里,我的解决方案是清理它并删除所有预编译框架(自定义框架),然后重新构建。
Note: The error description said something about key "aps-environment" as "development".
注意:错误描述将关键的“aps-environment”称为“development”。
回答by David P
I had the same problem and solved with a simple Product -> Clean.
我遇到了同样的问题,并通过一个简单的Product -> Clean解决了。
回答by Bluezen
If someone gets here by searching for both error ITMS-90164and error ITMS-90046with get-task-allowand asp-environmentkeys:
如果有人通过使用get-task-allow和asp-environment键搜索错误ITMS-90164和错误ITMS-90046到达这里:
Like David P said, a Product -> Cleanbefore a new Archive did solve my problem.
就像 David P 所说的那样,在新存档确实解决了我的问题之前,产品 -> 清理。
I just want to add that in my case I observed that the faulty xarchive was missing the following file:
我只想补充一点,在我的情况下,我观察到错误的 xarchive 缺少以下文件:
Before sending that .xarchive to your client for production signature, you might want to look for the archived-expanded-entitlements.xcent file and be sure it's there.
在将该 .xarchive 发送给您的客户以进行生产签名之前,您可能需要查找 archived-expanded-entitlements.xcent 文件并确保它在那里。
回答by KalleP
Change this in Entitlements.plist:
在 Entitlements.plist 中更改:
<key>aps-environment</key>
<string>development</string>
To this:
对此:
<key>aps-environment</key>
<string>production</string>
回答by Adrien Brecheteau
Same problem and solved with a simple Product -> Clean.
同样的问题,并通过一个简单的Product -> Clean 解决。
回答by RickiG
This can also be caused by you having to agree to a new contract in iTunes connect. Log in to iTunes connect and you should see a banner at the top prompting you to agree to the latest contract change.
这也可能是因为您必须同意 iTunes Connect 中的新合同。登录 iTunes Connect,您应该会在顶部看到一个横幅,提示您同意最新的合同变更。
回答by Cássio
回答by user5938649
If you do not select the corresponding release certificate before you pack, ERROR ITMS-90164 will be reported
如果打包前没有选择对应的发布证书,会报ERROR ITMS-90164
Build Setting -> the Code Signing Identity -> Release ->Any IOS SDK
Build Setting -> the Code Signing Identity -> Release -> Any IOS SDK
回答by Warren P
None of the other answers solved this error for me, but this did:
其他答案都没有为我解决这个错误,但这样做了:
Create new XCode application and go examine it's code signing settings.
Try to get your app to be set similarly to the default XCode 7 or Xcode 8 signing and provisioning settings, XCode 7 is shown here, it's changed again in XCode 8.
创建新的 XCode 应用程序并检查它的代码签名设置。
尝试将您的应用设置为类似于默认的 XCode 7 或 Xcode 8 签名和配置设置,此处显示了 XCode 7,它在 XCode 8 中再次更改。
- If the above is not enough, you may need to do it again, but this time, before you do, delete any old expired provisioning profiles from your apple Keyring or delete and re-sign into your apple developer (itunes) account in the XCode preferences. Be sure to EXIT XCODE and RESTART after ANY changes. Then add your account again, and let XCode fetch your new signing and team information.
- 如果以上还不够,你可能需要再做一次,但这次,在你做之前,从你的苹果钥匙圈中删除任何旧的过期配置文件,或者在 XCode 中删除并重新登录你的苹果开发者(itunes)帐户喜好。确保在任何更改后退出 XCODE 并重新启动。然后再次添加您的帐户,让 XCode 获取您的新签名和团队信息。