您如何修复“代码对象在子组件中根本没有签名:"在 Xcode 6、Mac OS X Yosemite 或 Mavericks 中? [英] How do you fix "code object is not signed at all In subcomponent:" in Xcode 6, Mac OS X Yosemite or Mavericks?

查看:29
本文介绍了您如何修复“代码对象在子组件中根本没有签名:"在 Xcode 6、Mac OS X Yosemite 或 Mavericks 中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

编译我的应用程序时出现以下错误:

When compiling my application I'm getting the following error:

CodeSign /Users/pupeno/Library/Developer/Xcode/DerivedData/ProjectX-cynmgyozflnwbpamwnpsnhgshuyq/Build/Products/Debug/Project X.app
    cd /Users/pupeno/Projects/ProjectX
    export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate

Signing Identity:     "Mac Developer: José Fernández (G4PM7K38JH)"

    /usr/bin/codesign --force --sign A21FB31766DDCBB28FBB4E4DD86E3743024A45F3 --entitlements /Users/pupeno/Library/Developer/Xcode/DerivedData/ProjectX-cynmgyozflnwbpamwnpsnhgshuyq/Build/Intermediates/ProjectX.build/Debug/App.build/Project X.app.xcent --requirements =designated => anchor apple generic  and identifier "$self.identifier" and ((cert leaf[field.1.2.840.113635.100.6.1.9] exists) or ( certificate 1[field.1.2.840.113635.100.6.2.6] exists and certificate leaf[field.1.2.840.113635.100.6.1.13] exists  and certificate leaf[subject.OU] = "XHT4M2DATL" )) /Users/pupeno/Library/Developer/Xcode/DerivedData/ProjectX-cynmgyozflnwbpamwnpsnhgshuyq/Build/Products/Debug/Project X.app

/Users/pupeno/Library/Developer/Xcode/DerivedData/ProjectX-cynmgyozflnwbpamwnpsnhgshuyq/Build/Products/Debug/Project X.app: code object is not signed at all
In subcomponent: /Users/pupeno/Library/Developer/Xcode/DerivedData/ProjectX-cynmgyozflnwbpamwnpsnhgshuyq/Build/Products/Debug/Project X.app/Contents/Frameworks/Paddle.framework
Command /usr/bin/codesign failed with exit code 1

我正在使用两个框架,Paddle 和 Sparkle,它们被配置为在副本上签名:

I'm using two frameworks, Paddle and Sparkle and they are configured to sign on copy:

在寻找解决这个问题的方法时,我发现很多建议做一个 --deep 标志,Apple 官方不鼓励这样做(正确使用代码设计工具的 --deep 选项).

Looking for a solution to this problem I found many recommendations to do a --deep sign, which is officially discouraged by Apple (Using the codesign Tool's --deep Option Correctly).

我还找到了文章代码签名和小牛这也解释了使用 --deep 是错误的并提供了一种替代方法:使用脚本为每个框架生成签名.我认为这是在 Xcode 可以选择在副本上签名之前需要的东西,但我还是试了一下.它没有区别,我仍然得到同样的错误.查看日志,捆绑包正在使用Sign on copy"选项进行签名,因此,添加该脚本会导致它们被签名两次.

I also found the article Code Signing and Mavericks which also explains that using --deep is wrong and offers an alternative: using a script to generate signatures for each framework. I think this is something that was needed before Xcode had the option to sign on copy, but I gave it a try anyway. It made no difference, I still get the same error. Looking at the logs, the bundles are getting signed with the "Sign on copy" option, so, adding that script caused them to get signed twice.

我的代码签名身份为整个项目配置如下,每个目标只是继承它:

My code signing identity is configured as follows for the whole project and each target just inherits it:

我知道这不是 Release 的合适签名,但目前,我们只是试图让它在本地构建和运行.

I understand that's not the appropriate signature for Release, but for now, we are just trying to get this to build and run locally.

任何想法有什么问题吗?任何想法如何解决它?我明白了

Any ideas what's wrong? Any ideas how to fix it? I understand that

推荐答案

问题是框架 Paddle.framework 损坏了.符号链接被解析为它们指向的文件,因此编译工作正常,但签名没有.

The problem was that the Framework, Paddle.framework, became corrupt. The symlinks were resolved to the files they were pointed to, so, compilation worked just fine, but signing didn't.

重新下载框架并将其复制到项目中解决了问题.

Re-downloading the framework and copying it into the project fixed the problem.

这篇关于您如何修复“代码对象在子组件中根本没有签名:"在 Xcode 6、Mac OS X Yosemite 或 Mavericks 中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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