Pregunta

I'm trying to set up an Applescript as a behavior in Xcode 4, but Xcode won't allow me to select my script. What kind of file is a valid script for Xcode? I've tried .applescript, .scpt, and .txt. I've also tried no extension at all.

What do I need to do?

¿Fue útil?

Solución

This is what I get for neglecting to read the documentation on creating a new behavior. (iOS developer login required.)

It turns out that Xcode can accept an executable file as a script. The solution was to run chmod +x on the script file and then Xcode allowed me to select it. It's funny, because I wasn't aware that Finder allowed filtering based on chmod permissions.

Otros consejos

While it appears you are looking specifically for AppleScript, shell files are valid for behavior scripts.

Create a new .sh file:

#!/bin/sh

#here is some code!

Make sure it is executable:

chmod +x <my file name>.sh

Assign it as the run script. That should be all you need to do.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top