I have the following code:
NSAppleScript* playPause = [[NSAppleScript alloc] initWithSource:
@"tell application \"Xcode\"to activate \n to open POSIX file \"beetSapper.xcodeproj""\n"
There are too many
tos in the code.
Since Xcode accepts also POSIX paths you can write
tell application "Xcode" activate open "/Users/myUser/Documents/beetSapper.xcodeproj/" end tell
The "stringyfied" equivalent is
"tell application \"Xcode\"\n activate\n open \"/Users/myUser/Documents/beetSapper.xcodeproj/\"\n end tell"
Be aware that you have to specify the full path to the project file starting with a slash.