Xcode 4 keyboard shortcut to switch build target destination

Viewed 4822

Is there a keyboard shortcut in Xcode 4 to switch the build target destination; that is, to switch from simulator to device and vice versa?

9 Answers

I have a slightly different problem but it might help you as well. I have only one physical device which always stays at the top. Its super simple to select top list device as a target.

Do:

  1. pops up the list for target devices

    CTRL + SHIFT + 0

  2. takes you to the first device

    CMD + UPARROW

  3. selects that device

    SPACE

Apple Script goes:

tell application "Xcode" to activate


tell application "System Events"
 tell process "Xcode"
    keystroke "0" using {control down, shift down}
    delay 0.55
    keystroke (ASCII character 29)
    delay 0.55
    keystroke (ASCII character 30) using command down
    delay 0.55
    keystroke (ASCII character 32)
    delay 0.55
    keystroke "r" using command down
 end tell
end tell

You can also option-click on the scheme in the title bar to directly open the settings for the scheme (whereas a normal click opens the context menu that displays a list of all the schemes).

Show Destinations

To bring up the list of destinations use ⤵︎

^ + Shift + 0

Related