2015-10-07 35 views
1

我正在使用codesign命令行实用程序来签署Atom Electron .app文件夹。我使用的命令是:代码签名:缺少DEVELOPER_DIR路径

codesign --verbose --deep --force --sign "Mac Developer: <MY NAME AND IDENTIFIER HERE>" AdminTool.app/Contents/Frameworks/Squirrel.framework 

我阅读了优胜美地的codesign实用程序需要您手动登录每个框架,然后才能签署整个的.app文件夹,所以这就是我试图通过签约做现在只需Squirrel.framework

我得到这个错误:

xcrun: error: missing DEVELOPER_DIR path: /Library/Developer/CommandLineTools/usr/bin/xcrun/ 

AdminTool.app/Contents/Frameworks/Squirrel.framework: the codesign_allocate helper tool cannot be found or used 

我看了关于codesign_allocate helper tool cannot be found问题先前StackOverflow的线程,我跟着它表示,受DEVELOPER_DIR环境变量重新分配在xcrun错误的路径。我不确定我是否搞砸了一些东西,现在无法签署我的应用程序。

任何帮助和/或指针将不胜感激!

回答

1

最终被用xcode-select --install安装的Xcode命令行工具,然后运行修复此:

xcode-select -s /Applications/Xcode.app/Contents/Developers 

我认为这正确地重置我DEVELOPER_DIR路径,以便codesign能找到它时,我又跑了。