User-1070892
User-1070892

Reputation: 929

Why can't my AppleScript get my Xcode project?

I want to run an iPhone project in the iOS Simulator using AppleScript, so I wrote this code:

tell application "Xcode"
    open "IAPPS:Xcode 4:EightQueens:EightQueens.xcodeproj"
    tell project "EightQueens.xcodeproj"
        clean
        build
        try
            debug
        end try
    end tell
    quit
end tell

But it is giving me this error:

Xcode got an error: Can’t get project "EightQueens.xcodeproj".

What am I doing wrong?

Upvotes: 0

Views: 360

Answers (1)

Guillaume
Guillaume

Reputation: 21736

It is because your project isn't named "EightQueens.xcodeproj".

Instead of
tell project "EightQueens.xcodeproj"
do:
tell project "EightQueens"

Upvotes: 2

Related Questions