错误 ITMS-90164/90046: 代码签名权限无效

注意: 我正在开发使用 Xamarin。类似的问题张贴在 Xamarin 论坛 给你

我正在创建一个叫做 公司应用程序的应用程序。然后,我为它创建了一个 AppID 公司应用程序,以及使用相应 AppID 的分发供应配置文件。我上传了二进制文件,运行良好。

然后我继续创建这个应用程序的演示版本(基本上是同一个应用程序,只是做了一些小的修改,所以它是相同的解决方案和项目,只是不同的捆绑包签名设置) ,公司应用程序演示使用一个新的应用程序 ID 公司。公司应用程序演示,以及一个新的分发供应配置文件使用新的应用程序 ID。我更新了 iOS 捆绑包签名选项,以使用新的供应配置文件并生成了 IPA。但是当我把这个上传到 Application Loader 时,我得到了以下错误:

[2015-01-2316:08:21 SGT ]错误: 错误 ITMS-90164: “无效代码 对应用程序包签名中的应用程序进行签名 与供应配置文件中包含的内容不匹配。 根据供应配置文件,bundle 包含一个键值 这是不允许的: “ TEAMID.com. Company. CompanyApp”作为密钥 ‘应用程式识别码’”

[2015-01-2316:08:21 SGT ]错误: 错误 ITMS-90046: “无效代码 签署权利你捆绑的签名包含 IOS 不支持的代码签名权限, 值“ TEAMID.com. Company. CompanyApp”表示密钥“ application-Identity” 不支持“ Payload/CompanyApp.app/CompanyApp”中的值 应该是一个以 TEAMID 开头的字符串,后跟一个点’, 后面跟着捆绑标识符”

我已经调试了好几天了,还是没有结果。

我想知道为什么当我签署了新的 应用程序加载程序抛出的错误是指原来的 TEAMID.com. Company. CompanyApp的 ID 而不是 TEAMID.com. Company. CompanyAppDemo?这是 Xamarin 的一个窃听器选错了供应配置文件还是我漏掉了什么?不同的应用程序不需要不同的证书,对吗?

请注意,我总是在更改 Xamarin 的 iOS 构建签名选项之前刷新 XCode > Preferences 中的配置文件列表。

58932 次浏览

Finally after 2 weeks of hair pulling..

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

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.

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.

Note: The error description said something about key "aps-environment" as "development".

Edit: The actual error message

I had tried to upload a build from a git branch that wasn't the master. To resolve the issue I merged the branch into the master and built again. I was then able to upload the build successfully.

  1. Go to Build Phase in Xcode
  2. Remove all the frameworks
  3. Add them back
  4. Now build->Archieve->Upload to App Store

Hurray, You are done with it. Problem solved

If you do not select the corresponding release certificate before you pack, ERROR ITMS-90164 will be reported

Build Setting -> the Code Signing Identity -> Release ->Any IOS SDK

I had the same problem and solved with a simple Product -> Clean.

Make sure you have selected the App target and not the WatchKit App when archiving.

If someone gets here by searching for both error ITMS-90164 and error ITMS-90046 with get-task-allow and asp-environment keys:

1

Like David P said, a Product -> Clean before a new Archive did solve my problem.

I just want to add that in my case I observed that the faulty xarchive was missing the following file:

2

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.

Same problem and solved with a simple Product -> Clean.

A project including 2 targets(with 2 Developer id ,2 entitlements) may lead to this. (Do not ask me how it is happened...)

When archiving, remove another entitlement file temporarily.

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.

For me, I was able to solve it by turning off / on again the automatic code signing feature:

enter image description here

Doing a proper Xcode 'Quit' and then restart was the final action that got it working for me.

I had changed the bundle identifier (for a demo version) and got the same error (as detailed in the question) when verifying my archived build. I am using Xcode. Just closing Xcode and reopening my project wasn't enough, but a full 'Quit' was. Something was probably cached somewhere I'm guessing.

I tried everything listed here, turned out the problem was my .entitlement file, that had lines I never put in in the first place, they just got added somehow.
Removed those lines and tried again, worked.

For me I had the wrong file in my Custom Entitlements setting under iOS Bundle Signing. Removed it and it worked!

None of the other answers solved this error for me, but this did:

  1. Create new XCode application and go examine it's code signing settings.

  2. 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.

provisioning and signing

  1. 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.

After many hours of investigation, i found an easy solution.

Instead of using the application loader to upload the application, I used the Organizer from XCode and it worked without any warnings when doing the upload!

For me, the problem was a Entitlements.plist that was auto-added and was empty. Removed it from the Custom entitlements field and solved the problem.

View of the iOS Bundle Signing on Visual Studio 2015

I have just renamed in entitlements.plist the value of Access domains from applinks:htts://domain.app.link to applinks:domain.app.link it works like a charm. Cheers!

My problem is I was using a wrong bundle to create IPA file

Change this in Entitlements.plist:

<key>aps-environment</key>
<string>development</string>

To this:

<key>aps-environment</key>
<string>production</string>

I had exactly the same problem and it was quite a stupid mistake. I don't want anyone to spend time on this, so for this one:

Mistake

So what happened here, was that i entered '10' in the deployment target. That should have been 10.0 instead. That is what produced the infamous ERROR ITMS-90164/90046: Invalid Code Signing Entitlements for me!

You should check your Entitlements. It is like plist file. Edit it to development and the remove the extra fields.

enter image description here

My two cents here.

Just now I stuck in this problem because when I copy my TeamID / Application ID from the apple developer portal which brings a lot of unrelated value to the entitlement.plist. I didn't notice this because I was using Xcode to edit the entitlement.plist and the input box will not display everything after the first new line character.

I suggest using plain text editor for entitlement.plist for this case.

Thanks, Samuel

After trying all tricks read last days at Stackoverflow i delete file "xxxxxx.entitlements" and regenerate it again. I click at Capabilities, select ON at Associated Domains and adding "Domains". Then at Capabilities > Push Notifications click on Fix "Add the Push Notifications entitlement to your entitlement file".

Making that let me do ARCHIVE Successful

I had a link like this webcredentials:https://************.link, which was causing my upload to fail. I removed it and the problem was solved.

The entitlement file had empty arrays, removing those solved the issue.