简体   繁体   English

在iPhone上安装应用程序时出现代码签名错误

[英]code sign error while installing application on iPhone

I have registered for Apple Developer Program. 我已经注册了Apple Developer Program。 I have installed my provisioning profile and other certificates successfully. 我已经成功安装了配置文件和其他证书。 But still, I am getting error while installing the app for ad-hoc distribution. 但仍然,在为临时分发安装应用程序时出现错误。

I am not sure about this, but I am getting my company name as "CXXXXXXXXX.abc-xyz.com" in mobileProvision certificate. 我不确定,但在mobileProvision证书中我的公司名称为“ CXXXXXXXXX.abc-xyz.com”。 Although I have entered my company name as "abcxyz" in developer profile. 尽管我在开发人员资料中输入了公司名称“ abcxyz”。

Now, in info.plist, I have tried many options like com.abc-xyz. 现在,在info.plist中,我尝试了很多选项,例如com.abc-xyz。 , com.com.abc-xyz. ,com.com.abc-xyz。 , com.abc-xyz.com.* but none of them works. ,com.abc-xyz.com。*,但它们都不起作用。

Here's the error that I am getting while installing: 这是我在安装时遇到的错误:

Provisioning profile specifies the Application Identifier 'abc-xyz.com' which doesn't match the current setting 'com.abc-xyz.ApplicationName' 配给配置文件指定了与当前设置“ com.abc-xyz.ApplicationName”不匹配的应用程序标识符“ abc-xyz.com”

As far as I know, I think the problem may be in my company name as it contains '-', '.' 据我所知,我认为问题可能出在我的公司名称中,因为它包含“-”,“。”。 and 'com'. 和“ com”。 But I have never entered name like abc-xyz.com anywhere apart from my email address. 但是除了我的电子邮件地址外,我从未输入过abc-xyz.com之类的名称。 ie xxx@abc-xyz.com 即xxx@abc-xyz.com

I don't know if I am missing something. 我不知道我是否想念什么。 Is there any solution for this? 有什么解决办法吗? Plz help if you have any suggestions. 如果您有任何建议,请帮助。

Thank you. 谢谢。

The bundle identifier in your info.plist should match the App ID of the provisioning profile. 您的info.plist中的捆绑包标识符应与供应配置文件的应用程序ID匹配。 If your provisioning profile has an App ID of "CXXXXXXXXX.abc-xyz.com" then it will only sign apps with a bundle identifier of "abc-xyz.com", not "com.abc-xyz.ApplicationName". 如果您的供应配置文件的应用程序ID为“ CXXXXXXXXX.abc-xyz.com”,则它将仅对捆绑标识符为“ abc-xyz.com”的应用程序进行签名,而不对“ com.abc-xyz.ApplicationName”进行签名。

You need to make the provisioning profile's App ID and the bundle identifier match. 您需要使供应配置文件的应用程序ID和捆绑包标识符匹配。 One way to do this is to set the App ID in the provisioning profile to "CXXXXXXXXX.com.abc-xyz.ApplicationName". 一种方法是将供应配置文件中的应用程序ID设置为“ CXXXXXXXXX.com.abc-xyz.ApplicationName”。

You can make the provisioning profile work for any app for your company by using a wildcard. 您可以使用通配符使配置文件适用于您公司的任何应用程序。 "CXXXXXXXXX.com.abc-xyz.*" will match any bundle identifier that starts with "com.abc-xyz.". “ CXXXXXXXXX.com.abc-xyz。*”将匹配任何以“ com.abc-xyz”开头的捆绑包标识符。

For simplicity, I tend to wildcard the whole string ("CXXXXXXXXX.*") for Ad Hoc and Development profiles. 为了简单起见,我倾向于通配Ad Hoc和Development配置文件的整个字符串(“ CXXXXXXXXX。*”)。

I lost 1 hour messing around with the Code Signing Identity in my Project configurations with no luck. 我在项目配置中花了1个小时弄乱了代码签名身份,没有运气。 After I made the same changes to the Target everything worked. 在对目标进行相同的更改后,一切正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM