我最近更新到XCode 6.3并开始有一些奇怪的代码签名问题.有时,XCode会开始抱怨代码签名问题.并且要么会有这样的问题:
invalid or unsupported format for signature ... Command /usr/bin/codesign failed with exit code 1
Run Code Online (Sandbox Code Playgroud)
要么
... Command /usr/bin/codesign failed with exit code 11
Run Code Online (Sandbox Code Playgroud)
还没有找到模式,但看起来像XCode代码签名的问题,因为有时在清理和重启XCode后它会起作用.
我没有更改任何有关代码签名的设置.项目结构相当复杂,它引用了项目和pod.
任何帮助赞赏.
**更新**
我删除派生数据或重新启动XCode没有帮助.但是如果我删除了项目并从git下载了新内容,它确实有效.这删除了未提交给git的XCode文件.
清洁后它再次停止工作.在控制台日志中我有这样的东西:
codesign[4111]: Internal error unloading bundle CFBundle 0x7fb44a40adc0 <(null)> (framework, not loaded)
Run Code Online (Sandbox Code Playgroud)
**另一个更新**
在Twitter上发现有同样问题的人.看起来问题是由代码签名中的--deep选项引起的.
https://github.com/atom/atom-shell/issues/1396
解决方案是不使用--deep对内部的签名应用程序和框架进行编码.而是代码分别签署每个框架.
我在Objective c类中有代码,如下所示:
closeButton.keyEquivalent = @"\e";
Run Code Online (Sandbox Code Playgroud)
这在swift中不起作用,因为它表示"文字中的转义序列无效".我试过使用以下代码:
closeButton.keyEquivalent = "\u{53}"
Run Code Online (Sandbox Code Playgroud)
但也没有运气.有任何想法吗 ?