2014-09-19 91 views
0

我有一個Applescript可以打開Safari開發人員工具。這使我無需每次構建Cordova/Phonegap應用程序時都可以輕鬆點擊Develop - > Inspect - > index.html。在XCode構建階段後運行Applescript

我現在想在構建項目並在模擬器中打開它時調用此Applescript。

我試着添加一個建築階段並按照https://developer.apple.com/library/ios/recipes/xcode_help-project_editor/Articles/AddingaRunScriptBuildPhase.html中的說明添加腳本。

但是,當我在XCode中構建項目時出現錯誤:"auto_opendevtools.applescript: bad interpreter: Permission denied"。似乎所有的權限都沒問題。

我如何進入腳本在構建階段:

enter image description here

信息錯誤:

enter image description here

回答

4

的 「添加運行腳本生成階段」,需要一個shell命令或shell腳本的路徑。

要從shell腳本運行AppleScript,必須使用osascript命令。

osascript "/the path of/auto_opendevtools.applescript" 
+0

所以你應該把'osascript「/ auto_opendevtools.applescript'的/路徑它說:‘殼牌:’或者,上面有該行的代碼粘貼在該領域 – John 2014-12-30 18:27:10

+1

@約翰類型的路徑或將其粘貼到殼牌字段上方的字段中 – jackjr300 2015-01-13 14:51:44

相關問題