views:

523

answers:

1

I have the Xcode bundle for TextMate and the Build and Run with XCode work fine but is there a way to pass Active Target, Active SDK or configuration into the build in order to launch the simulator?

I have tried setting shell vars in the prefs pane but no luck.

Thanks.

+1  A: 

Found at http://hexperimental.com/content/coding-iphone-apps-textmate

I haven't tested this myself, but this guy suggests setting TextMate as your editor of choice in xcode and then changing the run shortcut to use applescript to send keyboard shortcuts

Open the Bundle editor ( Bundles > Bundle Editor > Show Bundle editor ), the xcode bundle is all the way down, select the Run command and change the Command to this:

osascript -e 'tell application "Xcode"
activate
end tell

tell application "System Events"
key code 15 using {command down, shift down}
key code 15 using {command down}
end tell'

#I'm leaving the old command commented below just in case. 
#PROJECT=$(ruby -- "${TM_BUNDLE_SUPPORT}/bin/find_xcode_project.rb")
#if [[ -f "${PROJECT}/project.pbxproj" ]]; then
#   "${TM_BUNDLE_SUPPORT}/bin/run_xcode_target.rb" -project_dir="$PROJECT"
#else
#   echo "Didn't find an Xcode project file."
#   echo "You may want to set TM_XCODE_PROJECT."
#fi
Ryan