问题:

注意:我正在开发使用Xamarin。 类似的问题发布在Xamarin论坛这里

我正在创建一个名为CompanyApp的应用程序。 然后我为com.Company.CompanyApp创建了一个App ID,以及使用相应App ID的Distribution Provisioning Profile。 我上传了二进制文件,它工作得很好。

然后我继续创建应用程序的演示版本(基本上是相同的应用程序,只需要很少的修改,因此它是相同的解决方案和项目,只是不同的捆绑签名设置), CompanyAppDemo带有新的App ID com.Company.CompanyAppDemo ,以及新的分发配置文件,它使用新的App ID。 我更新了iOS Bundle Signing选项以使用新的Provisioning Profile并生成了IPA。 但是当我将其上传到Application Loader时,我收到以下错误:

[2015-01-23 16:08:21 SGT]错误:错误ITMS-90164:“无效的代码签名权利。您的应用程序包签名中的权利与供应配置文件中包含的权利不匹配。根据配置配置文件,捆绑包含一个不允许的密钥值:’TEAMID.com.Company.CompanyApp’,用于’Payload / CompanyApp.app / CompanyApp’中的密钥’application-identifier’

[2015-01-23 16:08:21 SGT]错误:错误ITMS-90046:“无效的代码签名权利。您的应用程序包的签名包含iOS不支持的代码签名权利。具体来说,价值’TEAMID.com.Company .CompanyApp’不支持’Payload / CompanyApp.app / CompanyApp’中的密钥’application-identifier’。该值应该是以TEAMID开头的字符串,后跟一个点’。’,后跟包标识符。“

我已经调试了好几天才弄明白无济于事。

我想知道为什么当我使用新配置文件签名时,Application Loader抛出的错误引用了原始TEAMID.com.Company.CompanyApp的ID而不是TEAMID.com.Company.CompanyAppDemo ? 这是Xamarin中的一个错误,它找错了配置文件或者我错过了什么? 对于不同的应用程序,您不需要不同的证书吗?

请注意,在更改Xamarin中的iOS Build Signing选项之前,我始终在XCode> Preference中刷新了Provisioning Profile列表。

Note: I’m developing using Xamarin.Similar question posted in Xamarin Forum hereI’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.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), CompanyAppDemo with 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:[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.”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.CompanyApp instead 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?Note that I have always refreshed the Provisioning Profile list in XCode > Preference before changing the iOS Build Signing option in Xamarin.