Reputation: 3514
I have an Applescript that opens the Safari developer tools. This saves me from the hassle of clicking Develop -> Inspect -> index.html every time I build a Cordova / Phonegap app.
I would now like to invoke this Applescript when I build the project and open it in the simulator.
I've tried adding a building phase and adding the script as instructed in https://developer.apple.com/library/ios/recipes/xcode_help-project_editor/Articles/AddingaRunScriptBuildPhase.html.
However when I build the project in XCode I'm getting an error: "auto_opendevtools.applescript: bad interpreter: Permission denied"
. Seems all the permissions are fine.
How I entered the script in the build phase:
Leads to error:
Upvotes: 0
Views: 1049
Reputation: 7191
The "Add Run Script Build Phase" need a shell command or a path of the shell script.
To run an AppleScript from a shell script, you must use the osascript
command.
osascript "/the path of/auto_opendevtools.applescript"
Upvotes: 6