I’m trying to play with AppleScript to compile all my Xcode projects.
I’m using the command do shell script to call Xcode like this :
try
do shell script "xcodebuild -project /Path/MyProject.xcodeproj -nodistribute -activetarget -sdk macosx10.5 -configuration Release build"
on error errMsg
TraceError(errMsg)
return
end try
But Xcode always complains it can’t find the project.
If I call the same command directly in the terminal, it works fine.
Any idea?
If it can’t find the project it’s probably because there are some spaces or something in the path which makes it unrecognizable in the form you have it. You normally would “quote” a path to account for these types of things. In applescript we can use the “quoted form of” command to solve this problem. Give the following a try and see if it helps.