I am trying to use Xcode to create and run on a device. My script looks like this:
tell application "Xcode"
open "tmp:iphone:myproject:Project.xcodeproj"
tell project "Project"
clean
build
launch
end tell
end tell
My project consists of two goals: MainTarget and SideTarget, SideTarget is added as a direct dependency of MainTarget. I noticed that when my applescript runs on a pre-cleaned project (deleting the build folder), only 65 files are compiled compared to when I click the "Build and Run" button in Xcode 130 the files are compiled.
The run command in the script seems to be ignored when applescript starts - it just doesn't run on the device. The state in the bottom pane when the script is completed is "Build completed successfully." What is the difference between “build” and “start” compared to clicking the “Create and Run” button in the Xcode top bar?
The project launches a penalty on the device when building and running through Xcode.
My main problem is that I cannot run applescript on the device. I don’t know where everything went wrong. Has anyone successfully launched Xcode to run on a device?
source
share