2015-10-07 37 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能找到它時,我又跑了。