2014-09-19 92 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

相关问题