I wrote the script below to get a list of the available ios profiles to run the simulator on. Does anyone have any thoughts of how to get the list without resorting to the ui?
A command line tool that does the trick would work too. xcodebuild -list will list targets, but not the available ios profiles.
set projectTargetName to "PeoplePicker"
activate application "Xcode"
tell application "System Events" to tell process "Xcode" to set popUpButton to pop up button 1 of list 1 of group 2 of toolbar 1 of window projectTargetName
ignoring application responses
tell application "System Events" to tell process "Xcode" to perform action "AXShowMenu" of popUpButton
end ignoring
activate application "Xcode"
tell application "System Events" to tell process "Xcode"
set targetMenuItem to first menu item of menu 1 of popUpButton whose title = projectTargetName
set targetSchemes to title of (menu items of menu 1 of targetMenuItem whose title ≠"")
end tell