Xcode 协同设计在所有其他构建中均失败
我的 iPhone 项目每次都无法构建,并给我以下信息:
CodeSign build/Debug-iphoneos/coati.app
cd /Users/rpeck/Documents/Coati
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
setenv _CODESIGN_ALLOCATE_ /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
/usr/bin/codesign -f -s "iPhone Developer: Ryan Peck (6VVQHFN5NU)" --resource-rules=/Users/rpeck/Documents/Coati/build/Debug-iphoneos/coati.app/ResourceRules.plist --entitlements /Users/rpeck/Documents/Coati/build/Coati.build/Debug-iphoneos/Coati.build/coati.xcent /Users/rpeck/Documents/Coati/build/Debug-iphoneos/coati.app
/Users/rpeck/Documents/Coati/build/Debug-iphoneos/coati.app: object file format invalid or unsuitable
Command /usr/bin/codesign failed with exit code 1
我第一次构建它总是失败。即使我在构建之间对文件进行了更改,第二次也会成功。如果我清理目标,下一次构建将始终失败。
这一切都在调试模式下进行。在发布模式下,构建会同样失败,但成功的构建在安装到手机上时总是显示“加载失败”。我检查了配置文件是否匹配并已被选中。
我发现了一个类似的问题,答案是项目中的多个 Info.plist 文件。我已经彻底检查了我的,没有额外的 Info.plist 文件。我还删除并重新安装了我的配置文件。
我看到的此错误的其他答案涉及定义 ResourceRules.plist 文件的路径。我已经尝试过在这些情况下提出的解决方案,但没有成功。
现在,自从我第二次构建它工作正常以来,这比任何事情都更加不便。我更担心的是,当我准备好发行版本时,它会给我带来问题,特别是因为发布版本配置不会安装到手机上。
所有这一切都是在我没有注意到 xCode 已打开这一事实时发生的善变提交问题之后开始的。它损坏了我的项目文件,虽然所有源都很好,但当我创建一个新项目然后引入所有旧源文件时,这个问题突然出现了。
My iPhone project fails to build every other time and gives me the following info:
CodeSign build/Debug-iphoneos/coati.app
cd /Users/rpeck/Documents/Coati
setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
setenv _CODESIGN_ALLOCATE_ /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate
/usr/bin/codesign -f -s "iPhone Developer: Ryan Peck (6VVQHFN5NU)" --resource-rules=/Users/rpeck/Documents/Coati/build/Debug-iphoneos/coati.app/ResourceRules.plist --entitlements /Users/rpeck/Documents/Coati/build/Coati.build/Debug-iphoneos/Coati.build/coati.xcent /Users/rpeck/Documents/Coati/build/Debug-iphoneos/coati.app
/Users/rpeck/Documents/Coati/build/Debug-iphoneos/coati.app: object file format invalid or unsuitable
Command /usr/bin/codesign failed with exit code 1
The first time I build it always fails. The second time succeeds, even if I've made changes to the files between the builds. If I clean the target, the next build will always fail.
This is all in debug mode. In release mode the builds fail the same, but the successful builds always say "Failed to load" when installing onto the phone. I checked that the provisioning profile matches and is selected.
I've found one similar question where the answer turned out to be multiple Info.plist files in the project. I've looked mine over completely and there is no extra Info.plist file. I've also removed and reinstalled my provisioning profiles.
The other answers I've seen for this error involved defining the path for the ResourceRules.plist file. I've tried the solutions presented in those cases with no success.
Right now it's more of an inconvenience than anything since the second time I build it works fine. I'm more worried that down the line when I'm ready for a distribution build it will give me problems, especially since the release build configuration won't install to the phone.
All of this started after a problem with a mercurial commit when I did not pay attention to the fact that xCode was open. It corrupted my project file, and while all the source was fine, when I created a new project and then brought in all of my old source files this problem cropped up.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,我再次尝试从头开始一个新项目。这次我分块添加了源代码,试图隔离任何问题。项目模板创建的一些文件必须手动修改,而不仅仅是替换。不过现在似乎运行良好。
Ok, I gave starting over from scratch with a new project a try again. This time I added back my source in chunks trying to isolate any issues. Some of the files created by the project template had to be modified by hand instead of just replaced. It seems to be working fine now though.