我有一个通过 Mac App Store 分发的 OS X 应用程序,最近更新到 Xcode 4.6.3。
当我现在运行常规构建时,我收到:
Command /usr/bin/codesign failed with exit code 1:
/Users/Craig/Library/Developer/Xcode/DerivedData/Mac-dxcgahgplwpbjedqnembegifbowj/Build/Products/Debug/MyApp.app: code object is not signed at all
In subcomponent: /Users/Craig/Library/Developer/Xcode/DerivedData/Mac-dxcgahgplwpbjedqnembegifbowj/Build/Products/Debug/MyApp.app/Contents/Frameworks/DropboxOSX.framework
Command /usr/bin/codesign failed with exit code 1
我似乎无法辨别项目中的任何其他更改,因此我无法判断这是与 4.6.3 更新相关的问题还是其他问题。
我尝试重新启动 Xcode、运行干净的构建并清理构建文件夹。
最佳答案
我想我可能已经弄清楚了这一点。我一直在 OS X Mavericks 上运行 Xcode 4.6.3,印象中任何特定于构建的工具都捆绑在 Xcode 应用程序中。
但是,似乎codesign
位于/usr/bin
中。我不确定它是由 Xcode 安装程序之一放置的还是随普通系统安装一起提供的。但是通读codesign
的man
页面,我发现了这个漂亮的选项:
--deep When signing a bundle, specifies that nested code content such as helpers, frameworks, and plug-ins, should be recursively signed
in turn. Beware that all signing options you specify will apply, in turn, to such nested content.
When verifying a bundle, specifies that any nested code content will be recursively verified as to its full content. By default,
verification of nested content is limited to a shallow investigation that may not detect changes to the nested code.
When displaying a signature, specifies that a list of directly nested code should be written to the display output. This lists only
code directly nested within the subject; anything nested indirectly will require recursive application of the codesign command.
然后我发现了两周前(~2013 年 6 月)的这篇文章 ( https://alpha.app.net/isaiah/post/6774960 ),其中提到了(尽管是二手的):
@isaiah I asked a guy in the labs about it. He said codesign now requires embedded frameworks to be signed separately before code signing the app bundle as a whole.
手动重新运行 Xcode 通常运行的 codesign
命令,同时在末尾添加 --deep
标志,正确签署应用程序。
我还不确定这个手动签名会产生什么影响,或者我是否可以调整 Xcode 构建以自动添加 --deep
标志,但这似乎是根本问题。 (codesign
不再自动对您的应用程序包进行深度签名。)
关于xcode - Xcode 4.6.3 中 Dropbox API 的代码设计失败 : "code object is not signed at all",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17263967/