Xcode:iPhone 应用程序协同设计错误

发布于 2024-07-10 05:05:08 字数 203 浏览 6 评论 0原文

在 Xcode 中构建新的 iPhone 应用程序时,我收到此错误:

代码设计错误:代码签名身份 “iphone 开发者”与任何内容都不匹配 您的代码签名证书 钥匙链。 一旦添加到钥匙串中, 触摸文件或清理项目以 继续。

解决办法是什么?

When building a new iPhone app in Xcode, I'm getting this error:

codesign error: code signing identity
'iphone developer' does not match any
code-signing certificate in your
keychain. once added to the keychain,
touch a file or clean the project to
continue.

What's the fix?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(10

花开半夏魅人心 2024-07-17 05:05:08

修复方法非常简单。 在“构建结果”窗口(您可能通过单击项目窗口右下角的错误图标来进入该窗口),将下拉菜单从“设备 - iPhone xxx”更改为“模拟器 - iPhone xxx”。

xcode-截图
(来源:kickasslabs.com)

The fix is pretty simple. In the Build Results window (which you probably got to by clicking the error icon in the lower right corner of your project window), change the pulldown menu from ‘Device - iPhone xxx’ to ‘Simulator - iPhone xxx’.

xcode-screenshot
(source: kickasslabs.com)

不及他 2024-07-17 05:05:08

您需要加入 99 美元的开发者计划才能在实际手机上进行测试。 Apple 应该提供有关在您被接受加入该计划后如何对您的代码进行签名的信息。

You need to be part of the $99 developer program to test on the actual phone. Apple should have info about how to sign your code once you're accepted into the program.

地狱即天堂 2024-07-17 05:05:08

当我不小心修改了目标级别而不是项目级别的代码签名身份构建设置时,出现了此错误。 确保您在项目级别输入了正确的信息(获取有关项目的信息,而不是目标的信息。)如果您更改了目标构建设置,请尝试从那里删除这些值。 然后目标将继承项目的设置。

我还会执行“全部清理”,然后退出 xcode,删除构建文件夹中的所有内容并尝试进行另一个构建。 (这是一个 Xcode 巫术技巧,似乎可以解决许多代码签名问题。)

I got this error when I accidentally modified the code signing identity build setting at the target rather than the project level. Make sure that you have the correct information entered at the project level (get info on the project, rather than the target.) If you changed the target build settings, try deleting the values from there. The target will then inherit the project's setting.

I would also do a "clean all", then exit xcode, delete everything from the build folder and try to do another build. (This is an Xcode voodoo trick that seems to solve many code signing issues.)

葮薆情 2024-07-17 05:05:08

我刚刚解决了我的代码签名问题。 什么样的恶梦! 两天8个多小时的挫败感。 我尝试了新应用程序、新应用程序名称、新证书、删除配置文件等。基本上我的钥匙串中有两个“iPhone Distribution”证书,导致所有代码签名失败。 但有一个被隐藏了! 可见的证书位于我的登录钥匙串中。 隐形证书位于我的系统钥匙串中。 请注意,请将您的证书添加到任一钥匙串,但不能同时添加到两者! 我从系统钥匙串中删除了该证书,它变成了幽灵证书。 它不再出现在系统钥匙串“钥匙串访问”工具中,但它确实存在于实际的系统钥匙串文件中,因此实际上它尚未被删除。 我在钥匙串文件中查找了“Distribution”一词,它就在那里! 我的解决方案是从修复代码签名的钥匙串文件中删除包含 iPhone Distribution 的行。 结果是我的系统钥匙串坏了。 但我可以再次签署应用程序\m/

I just solved my code signing problem. What a nightmare! Over 8 hours of frustration over two days. I tried new apps, new app names, new certificates, deleting provisioning profiles etc. Basically I had two "iPhone Distribution" certificates in my keychain causing all code signing to fail. But one was hidden! The visible cert was in my Login keychain. The invisible cert was in my System keychain. Be warned, add your certificate to either keychain but not both! I deleted the certificate from the System keychain and it became a ghost certificate. It no longer appears in the System keychain "Keychain Access" tool but it did exist in the actual System keychain file, so effectively it had not been removed. I grepped the keychain file for the word Distribution and there it was! My solution was to remove that line containing iPhone Distribution from the keychain file which fixed the code signing. The result is I have a broken System keychain. But I can sign apps again \m/

两个我 2024-07-17 05:05:08

这可能听起来很有趣,但我到处寻找解决方案。 最终我发现,在左上角的 Xcode 中,您选择设备和版本的下拉列表中,我在下拉列表中选择了“调试”而不是发布。 一旦我选择发布,问题就得到解决。

this may sound funny, but I searched everywhere for a solution. Eventually I found out that in Xcode in the top left, the dropdown where you select Device and verison, I had "debug" selected in the dropdown instead of release. Once I selected release the problem was fixed.

乖乖公主 2024-07-17 05:05:08

当您收到其他人的 Xcode 项目时,就会发生这种情况。

这是我为解决问题所做的事情。

  1. 在钥匙链访问中注册您的钥匙。 您可以在 iOS 配置中下载密钥
    门户网站。 (应用程序 -> 实用程序 -> 钥匙串访问)
  2. 安装应用程序的配置文件。
  3. 在项目配置中更改 iPhone 开发人员。 (目标信息 -> 构建水龙头 -> 代码签名 -> 代码签名身份和任何 iOS)

This situation is happening when you receive a Xcode project from other person.

Here is what I did to solve the problem.

  1. Register your key in a key chain access. You can download your key in iOS provisioning
    portal. (Application -> Utility -> Keychain Access)
  2. Install Provisioning file for the app.
  3. Change iPhone developer in a project configuration. (Target Info -> Build tap -> Code Signing -> Code Signing Identity and Any iOS)
放手` 2024-07-17 05:05:08

我有同样的问题。 在这里找到修复:

iphone sdk 工具实用程序

在 Keychain Access.app 中,我的开发人员证书将显示为“此证书由未知机构签名”。 原因是我没有 ADC 中级证书(您可以从“证书”选项卡中的“配置程序”下载该证书)。
一旦我安装了这个,开发人员证书就会正确显示在钥匙串中,我的代码就可以部署在该死的手机上。

I had the same problem. Found the fix here:

iphone sdk tools utilities

In Keychain Access.app my Developer Certificate would show up as "This certificate was signed by an unknown authority". The reason was that I didn't have the ADC intermediate certificate (which you can download from "Provisioning Program" in "Certificates" tab.
Once I installed this the developer certificate showed up correctly in keychain and my code could be deployed on the bloody phone.

屋顶上的小猫咪 2024-07-17 05:05:08

不需要巫毒。 有时,某些应用程序会更改默认钥匙串,并且 Xcode 会停止查找 iPhone 开发人员密钥。 解决方案很简单(它对我有用):

  1. 列表项 启动钥匙串访问应用程序
  2. Ctrl+单击存储开发密钥的钥匙串,然后选择“设为默认钥匙串”
  3. 享受开发出色的 iPhone 应用程序。

No Voodoo necessary. Sometimes some app changes default keychain and Xcode stops finding iPhone Developer Keys. The solution is simple (it worked for me):

  1. List item Start Keychain Access app
  2. Ctrl+click on keychain where you stored your development keys and select Make Keychain Default
  3. Enjoy developing great iPhone apps.
凉城已无爱 2024-07-17 05:05:08

当上述方法都没有帮助我时,我不小心删除了带有电子签名证书的读卡器,现在我的应用程序构建没有错误。 如果您有此类证书,请尝试拔掉它一会儿。

When none of the above helped me, I accidentally removed my card reader with my electronic signature certificate on it and now my app builds without errors. If you have such certificate, try unplugging it for a moment.

话少情深 2024-07-17 05:05:08

我刚刚解决了这样做的问题:

  • 的“项目导航器”中单击您的主项目文件夹
  • 在右侧窗口
  • ,在“代码签名”下选择您的目标,将代码签名身份从任何内容更改为您的
  • 设置活动方案(在顶部)左边(除了“运行”按钮)到您的 iPhone/iPad

希望这对那里的人有帮助!

I just solved my problem doing this:

  • click in your main project folder in Project Navigator
  • at the right side window, choose your Target
  • under "Code Signing", change the Code Signing Identity from whatever it was to yours
  • set the active scheme (at top left, besides the "Run" button) to your iPhone/iPad

Hope this help someone out there !

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文