协同设计失败,退出代码为1-无法建立副本资源 [英] Codesign failed with exit code 1 - failing to build copy resources
问题描述
我意识到这个问题已经被问过好几次了,但是我尝试使用很多给定的答案来解决问题,但是没有运气。
I realise that this question has been asked quite a few times already, but I have tried to solve using a lot of the given answers with no luck.
CodeSign /Users/XXXXXXXX/Library/Developer/Xcode/DerivedData/XXXXXXXX-blligpejpeysabczydnolvooizok/Build/Products/Debug-iphoneos/XXXXXXXX.app
cd /Users/XXXXXXXX/Documents/Development/Native/tomhais
export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
Signing Identity: "iPhone Developer: XXXXXXX"
Provisioning Profile: "iOS Team Provisioning Profile: XXXXXX"
XXXXXXXX
/usr/bin/codesign --force --sign XXXXXXXXX --entitlements /Users/XXXXXXX/Library/Developer/Xcode/DerivedData/XXXXXXX-XXXXXXXX/Build/Intermediates/tomhais.build/Debug-iphoneos/XXXXXX.build/XXXXXXX.app.xcent --timestamp=none /Users/XXXXXXX/Library/Developer/Xcode/DerivedData/XXXXXXX-XXXXXXXX/Build/Products/Debug-iphoneos/tomhais.app
/Users/XXXXXXX/Library/Developer/Xcode/DerivedData/XXXXXXX-XXXXXXXX/Build/Products/Debug-iphoneos/XXXXXXXX.app: code object is not signed at all
In subcomponent: /Users/XXXXXXXX/Library/Developer/Xcode/DerivedData/XXXXXXXX-XXXXXXXX/Build/Products/Debug-iphoneos/XXXXXXXX.app/0CeadLitir.png
Command /usr/bin/codesign failed with exit code 1
我尝试了以下操作:
- 删除我的开发者帐户并再次添加它
- 全部删除配置文件并重新下载
- 检查了钥匙串访问权限,以确保它们使用系统
默认值 - 检查了我的代码签名正在获取正确的
证书 - 从资源中删除该图像/将其从构建阶段/复制捆绑资源中删除并再次添加
- 重新启动计算机chine
- 在机器上被诅咒
- Deleted my developer account and added it again
- Deleted all the provisioning profiles and re-downloaded them
- Checked the key-chain access to make sure that they use system defaults
- Checked that my Code Signing is pulling in the right certificates
- Deleted the image from resources/ removed it from `Build Phases / Copy Bundle Resources and added it again'
- Rebooted the machine
- Cursed at the machine
关于我可以尝试的方法的任何其他想法?
Any further ideas of what I might try?
推荐答案
<我发现,在应用程序捆绑包中有一个名为 resources的文件夹会导致代码签名失败。我认为,这似乎是iOS应用程序的某些实现细节或代码签名的未记录结果。一个只有资源文件夹和一个随机文件的空项目会重现该问题。
What I found was that having a folder named "resources" in the application bundle will cause code sign to fail. This seems to be an undocumented consequence of some implementation detail of iOS apps or code signing, I think. An empty project with just a resources folder with one random file in it reproduced the issue.
我无法轻松地使用共享代码库重命名该文件夹,因此我的解决方案是将我的 resources文件夹放在一个具有不同名称的父文件夹中,并调整构建资源路径的方式。
I couldn't easily rename the folder with our shared codebase so my solution was to put my "resources" folder in a parent folder with a different name, and adjust the way our resource path was built.
这篇关于协同设计失败,退出代码为1-无法建立副本资源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!