在其他xcode iphone项目成功签名后,Codesign只能成功 [英] Codesign only succeeds after other xcode iphone project is successfully signed

查看:186
本文介绍了在其他xcode iphone项目成功签名后,Codesign只能成功的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个奇怪的问题。 Codeign拒绝签署我拥有的这个大项目,项目A,但确实签署了另一个,项目B.但是,当我签署项目B时,它也可以突然签署项目A.我百分百肯定我没有改变别的。我采取的步骤是:

I have a weird issue. Codesign refuses to sign this big project I have, project A, but does signs the other, project B. However, when I have signed project B, it also can sign project A all of a sudden. I am 100% certain I didn't change anything else. The steps I took were:

尝试构建,签署A - 签名失败

尝试构建,签署B - 成功

尝试构建,签署A - 成功

Try to build, sign A - fails on signing
Try to build, sign B - succeeds
Try to build, sign A - succeeds

成绩单:

CodeSign build/Debug-iphoneos/CPPlayer.app
cd /Users/nick/CPPlayer
setenv CODESIGN_ALLOCATE /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/usr/bin/codesign -f -s "iPhone Developer: Nick Overdijk (PM7C8QKTYS)" --resource-rules=/Users/nick/CPPlayer/build/Debug-iphoneos/CPPlayer.app/ResourceRules.plist --entitlements /Users/nick/CPPlayer/build/CPPlayer.build/Debug-iphoneos/CPPlayer.build/CPPlayer.xcent /Users/nick/CPPlayer/build/Debug-iphoneos/CPPlayer.app

/Users/nick/CPPlayer/build/Debug-iphoneos/CPPlayer.app: object file format invalid or unsuitable
Command /usr/bin/codesign failed with exit code 1

在图片中:见这里(imageshack gallery)

有什么我可以错过的吗?任何想法如何发生这种情况?我现在一切都工作了,这似乎解决了我的问题,但我想了解发生了什么。

Is there anything I could've missed? Any ideas how this can happen? I got everything working now and this seems a cure for my problem, but I'd like to understand what is happening.

有时候它也是这样的:

构建/签署A - 成功

构建/签署A - 失败

构建/签署B - 成功(B似乎总是成功)

构建/签署A - 成功

构建/签署A - 失败

Sometimes it also works like this:
Build/sign A - succeeds
Build/sign A - fails
Build/sign B - succeeds (B always seems to succeed)
Build/sign A - succeeds
Build/sign A - fails

因此,在每次成功构建A之后,我必须构建并签署B能够再次签署项目A.我可以连续多次重建项目B,它总是成功的。

So, after every successful build of A, I have to build and sign B to be able to sign project A again. I can rebuild project B any number of times in succession, it always succeeds.

我不确定它是否重要,但是当我尝试在模拟器中运行它时(iPhone OS 3.1.2的调试模式)它无法安装每个其他时间。所以:

I'm not sure if it matters, but also when I try to run it in the simulator (debug mode for iPhone OS 3.1.2) it fails to install each other time. So:

构建/运行 - 失败

构建/运行 - 工程

构建/运行 - 失败

构建/运行 - 工作

Build/run - Fails
Build/run - Works
Build/run - Fails
Build/run - Works

这仅适用于项目A,我可以根据自己的喜好多次构建和运行项目B,我从来没有收到消息安装失败。

This goes only for Project A, I can build and run project B as many times as I like, I never get the message that the installation failed.

提前致谢,

Nick

Thanks in advance,
Nick

推荐答案

<问题可能是info.plist文件太多。

The problem could be too many info.plist files.

我遇到了同样的问题(交替编码成功和失败)。

I had the same problem (alternating codesign success and failure).

我在项目中添加了一个源代码目录,并在目录中添加了添加现有文件。原来在目录中有一个 info.plist 文件,所以我现在在我的项目中有两个。我删除了新的并将其从项目中删除,我的问题解决了。

I had added a directory of source code to my project, with "add existing files" on the directory. Turns out there was a info.plist file in the directory, so I now had 2 of them in my project. I deleted the new one and removed it from the project, and my problem was solved.

这篇关于在其他xcode iphone项目成功签名后,Codesign只能成功的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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