您如何解决“代码对象根本没有在In子组件中签名:"在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?

查看:196
本文介绍了您如何解决“代码对象根本没有在In子组件中签名:"在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 sign,这是Apple正式建议的(

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可以选择在副本上签名之前所需要的,但是我还是尝试了一下.没关系,我仍然遇到相同的错误.通过查看日志,可以使用登录时复制"选项对捆绑包进行签名,因此,添加该脚本会使捆绑包获得两次签名.

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.

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

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