我想我可能已经弄清楚了这一点。我一直在 OS X Mavericks 上运行 Xcode 4.6.3,印象中任何特定于构建的工具都捆绑在 Xcode 应用程序中。
但是,看来codesign
is in /usr/bin
。我不确定它是由 Xcode 安装程序之一放置的还是随普通系统安装一起提供的。但通读一遍man
页面为codesign
,我发现了这个漂亮的选项:
--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.
然后我发现了这篇文章(https://alpha.app.net/isaaiah/post/6774960 https://alpha.app.net/isaiah/post/6774960%29)两周前(~2013 年 6 月),其中提到(尽管是二手的):
@isaiah 我向实验室里的一个人询问了这个问题。他说现在协同设计
要求嵌入式框架在代码之前单独签名
将应用程序包作为一个整体进行签名。
手动重新运行codesign
Xcode 正常运行的命令,同时添加--deep
标记到最后,正确签署应用程序。
我还不确定这个手动签名会产生什么影响,或者我是否可以调整 Xcode 构建来添加--deep
自动标记,但这似乎是根本问题。 (codesign
不再自动对您的应用程序包进行深度签名。)