Reputation: 141
I'm wanting to automate the build of my iPhone apps across multiple devices (all connected at once) within Xcode, but I can't work out how to use AppleScript to select which device to build on.
From within Xcode (version 3.2.4) you can select the device to build/debug on by changing the Active Executable (Project>Set Active Executable) to match the name of your device but creating a new Active Executable in AppleScript (set e to make new executable with properties {name:"app - device", path:"build/Release-iphoneos/app.app"} simply creates a new executable and attempts to launch it on the machine (not the device, not even the simulator). Is there somewhere else I can make the selection of which device to run on?
I'm really sick of having to constantly change the active executable to change between the iPad, retina display and non-retina display, this would allow me to build upon a device of my choosing with a script. Any help would be greatly appreciated.
Upvotes: 2
Views: 1075
Reputation: 5045
This question has already been asked; Applescript isn't the entire solution here. You need also take a look at the xcodebuild
command in Terminal
xcodebuild -configuration myChosenConfig -target myTarget -project myAppProject.xcodeproj
You can easily fold in the command into an Applescript using the do shell script
command.
Upvotes: 0