开发者

AppleScript to build on multiple iOS devices within Xcode?

开发者 https://www.devze.com 2023-01-25 05:33 出处:网络
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.

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 real开发者_StackOverflow中文版ly 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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消