Forked from rgabbard/iOS Simulator Device.scpt
Last active
December 10, 2015 22:58
-
-
Save benbahrenburg/4505756 to your computer and use it in GitHub Desktop.
Updated to add iPhone 5, and Retina iPad support
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set selectedDevices to choose from list {"iPhone", "iPhone (Retina 3.5-inch)", "iPhone (Retina 4-inch)", "iPad", "iPad (Retina)"} with prompt "Choose device type:" default items {"iPhone"} without multiple selections allowed | |
if selectedDevices is not false then | |
set selectedDevice to item 1 of selectedDevices as string | |
set thePListFolderPath to path to preferences folder from user domain as string | |
set thePListPath to thePListFolderPath & "com.apple.iphonesimulator.plist" | |
tell application "System Events" | |
tell property list file thePListPath | |
tell contents | |
set value of property list item "SimulateDevice" to selectedDevice | |
end tell | |
end tell | |
end tell | |
end if |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment