Xcode 4.3:Codeign操作失败(检查您选择的身份是否有效) [英] Xcode 4.3: Codesign operation failed (Check that the identity you selected is valid)

查看:105
本文介绍了Xcode 4.3:Codeign操作失败(检查您选择的身份是否有效)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

安装Xcode 4.3后,我无法使用Organizer验证和分发应用程序。
在Xcode中构建,签名和验证是正常的,组织者中的验证失败,并在此问题的标题中显示消息。

After installing Xcode 4.3 I can't validate and distribute application using Organizer. While building, signing and validating in Xcode is OK, the validation in Organizer fails with the message in the title of this question.

首先,Xcode 4.3可以自动下载配置文件(管理器中有一个选项),但它只下载开发配置文件并忽略分发配置文件,就好像没有。好的,我手动下载并安装它,它出现在管理器中。然后,我为项目和目标设置了正确的代码签名标识,并使用与我的钥匙串中的分发证书匹配的分发配置文件。然后我进行归档(build-sign-verify)并且没有错误,在日志中我看到CodeSign的绿色复选标记和验证步骤。看起来不错,存档会出现在管理器中。

First, Xcode 4.3 can download provisioning profiles automatically (there's an option in Organizer), but it downloads only development profiles and ignores distribution profiles as if there are none. OK, I downloaded and installed it manually and it appears in Organizer. Then I set proper Code Signing Identity both for project and for target and use Distribution profile that matches Distribution certificate in my keychain. Then I do Archive (build-sign-verify) and no errors, in the log I see green checkmarks for CodeSign and for Verify steps. Looks good and the archive appears in Organizer.

这就是出错的地方,我只选择验证,选择刚刚在iTunes Connect中准备的新版本,选择正确的代码签名身份,与用于存档的相同(实际上,在我的情况下没有其他选择),它像往常一样请求iTunes登录/密码,然后说

And that's where all goes wrong, I just select Validate, choose the new version I just prepared in iTunes Connect, choose correct code signing identity, same as was used for Archiving (actually, there are no other choices in my case), it asks for iTunes login/password as usual, and then says


代码签名操作失败

Codesign operation failed

检查您选择的身份是否有效

Check that the identity you selected is valid

啊!为什么!?存档时没有问题,然后在尝试提交到AppStore时,相同的代码签名不起作用。好吧,甚至没有提交,但在实际发送之前验证。所以这个问题是我的机器的本地问题。在构建期间成功完成的签名和验证在Organizer中失败...

Ahhh!!! Why!? It had no problems while archiving it, then same code signing doesn't work when trying to submit to AppStore. Well, not even submit, but validate before actually sending it. So this issue is local to my machine. The very same signing and validation that is successful during build, fails in Organizer...

我尝试了所有内容,重新安装了Xcode,删除/撤销并重新发布了所有内容证书,从钥匙串中删除重复的私钥和公钥,将所有证书放在一个登录钥匙串中,发布新的配置文件,安装Application Loader 2.5.1,等等......仍然没有运气。

I tried everything, re-installed Xcode, removed/revoked and re-issued all certificates, removed duplicated private and public keys from keychain, put all certificates in one "login" keychain, issued new profiles, installed Application Loader 2.5.1, and so on... still no luck.

可能是因为我之前的Xcode安装有一些遗留问题吗?或者我必须更新一些工具才能使管理器正常工作?

Could it be that I have some left-over from previous Xcode installs? Or that I have to update some tools to make Organizer work properly?

同时,如果有人知道将二进制文件上传到AppStore的另一种方法,请分享。我无法弄清楚如何使用Application Loader,当它要求我选择要上传的包时,我所拥有的是Xcode在存档步骤中创建的xcode存档。如何获取iap或Application Loader想要的任何文件?

Meanwhile, if anyone knows another way to upload binary to AppStore, please share. I couldn't figure out how to do that using Application Loader, when it asks me to choose a bundle to upload, all I have is xcode archive created by Xcode in Archive step. How do I get my hands on iap or whatever file the Application Loader wants from me?

推荐答案

我发现Xcode 4.3 .1在应用程序包内的目录树中验证具有资源的应用程序存在严重问题。

I've discovered that Xcode 4.3.1 has a serious issue validating apps with resources within a directory tree within an application bundle.

应用程序可以在XcodeBuild for Archive过程中通过验证 - 仅限于通过管理器运行验证时失败。

Apps can pass validation within the Xcode "Build for Archive" process - it only fails when the validation is run via Organizer.

在花费数小时试图追踪通常的代码签名权利问题后,我最终在导出失败时注意到系统控制台中的以下行:

After spending hours trying to trace down the usual code signing entitlement issues, I eventually noticed the following line in the system console when the export fails:

3/10/12 2:32:48.450 PM [0x0-0x261261] .com.apple.dt.Xcode:/ Users / chris / Library / Developer / Xcode / Archives / 2012-03-10 /覆盖范围3-10-12 2.32 PM.xcarchive / Products / Applications / Coverage.app / Tiles / T-Mobile-roam / 4:是目录

我花了一天的时间试图找出这个bug,我终于把它钉了出来。

I spent a day trying to isolate this bug, and I've finally nailed it.

验证时XCode 4.3.1中的代码签名者只要捆绑包中的子目录与其父目录具有相同的名称,就可以存储App Store或保存AdHoc分发阻塞。

The code signer in XCode 4.3.1 when validating for the App Store or saving for AdHoc distribution chokes whenever there is a subdirectory in your bundle that has the same name as its parent directory.

例如:

test/test/file.x -- FAIL
test/test2/file.x -- WORKS

这似乎是Xcode 4.3.1中的新功能,希望很快就会修复。

This seems to be new in Xcode 4.3.1, and hopefully will be fixed soon.

注意:这个阅读似乎相关: https://devforums.apple.com/message/630800

Notes: This thread seems related: https://devforums.apple.com/message/630800

这篇关于Xcode 4.3:Codeign操作失败(检查您选择的身份是否有效)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆