I'm trying to applescript XCode into building and launching on device. My script is as follows:
tell application "Xcode"
open "tmp:iphone:myproject:Project.xcodeproj"
tell project "Project"
clean
build
launch
end tell
end tell
My project consists of two targets, MainTarget and a SideTarget, the SideTarget is added as a direct dependency of MainTarget. I noticed that when my applescript runs on a pre-cleaned project (removing the build folder) only 65 files are compiled compared to when I press the "Build & Run" button in XCode 130 files are compiled.
The "launch" command in the script seems to be ignored when running the applescript - it simply does not launch on the device. The status in the bottom bar when the script is complete is "Build succeeded". What is the difference between "build" followed by "launch" compared to pressing the "Build & Run" button in the XCode top bar?
The project launches fine on device when building and running through XCode.
My main issue is that I can't get the applescript to launch on device. I do not know where things go wrong. Has anyone successfully scripted XCode to launch on device?
I've had this same problem. launch just does not work. You'll have to use debug instead.
Also, debug blocks forever, so invoke it with timeout and catch the timeout error and ignore it.
build and build and run are two separate commands within Xcode's GUI (v3.1.4 with build and go (run) and build and debug being the remainder). But the Dictionary for Xcode only shows build as being supported via Applescript. I would say both of these commands are the same as they are in the GUI, and in a perfect AS world we would see build and run in the Dictionary to make it more clear.
My question is whether launch is really building the app or just launching the previously built executable.
Related
I just installed netbeans 12.0 again (I formatted my computer previously), I was customizing it but now every time I make a code I have to click on the Clean And Build Project button before clicking on the Run button, which is quite a lot. tired and takes time, when that should be automatic.
For example: I create a System.out.println ("Hello"); , I run the program and nothing appears on the console, I click the Clean And Build button and now it appear on the console; I change the message from "Hello" to "How are you?", I run the program and the "Hello" that I had written previously appears, that is, the application continues executing the previous code until I click Clean And Build. How can i solve this? Greetings.
Follow the below steps.
Note:Make sure your project haven't any errors.
Go to the project Explorer.
Right click on your project.
Select Clean (Now your code will clean).
After the clean build your project.
Then you can run your project.It should be ok
XCODE version: 4.6.2
This is what happens when I click on RUN.
Message: "Running 1 of 1 custom shell scripts" and the progress bar just halts.
Then just creates a lot of xcodebuild processes(I can see the processes getting spawned in Activity monitor).
I quit XCODE from Activity monitor, but still the xcodebuild processes keep getting created.
As a background my app had a few warnings before i hit the RUN button in XCODE. Any clue how I can debug this without restarting my Mac everytime?
is possible build an iPhone project from Mac os x terminal and without an xcode project?
I'd like to make an iPhone static library without create and using xcode project and only with the terminal.
Thanks
For subsequent builds, after the first one, you can look at the command lines that Xcode executes in its Build window (there's a little command disclosure tab) and copy all those command lines into a script or suitable makefile template.
In Eclipse®, on the Run menu, click Debug Configurations or Run Configurations.
Expand the BlackBerry Simulator item.
Perform one of the following tasks:
To work with an existing launch configuration, under BlackBerry Simulator, click a launch configuration.
To work with a new launch configuration, right-click BlackBerry Simulator, and click New.
Click the Simulator tab.
Click the General tab.
Click run
i have followed all the steps above but still i am getting the error failed to connect to the remote VM.Connection time out.org.eclipse.jdi.TimeoutException
can anyboby help me in this issue
Do you see this every time you launch your test?
This thread mentions:
For the 8530 simulator just try it again.
I get that message sometimes when I am running too many apps/low memory (I do a lot)/just started Eclipse/etc.
Often if I run it a second, sometimes third time it works and continues to work after that.
When I build using MonoDevelop using the MonoTouch framework it appears the iPhone Simulator always loads in the background, is there any way to bring this to the front instead of always having to click it in the dock to bring it up?
Can't find anything in preferences.
Include a compiled AppleScript in your build process:
tell application "iPhone Simulator"
activate
end tell
Create a new AppleScript file e.g. simulator.scpt and add this code:
tell application "Simulator"
activate
end tell
Compile and export as a script, optionally code sign it.
In Xcode, select the target, click + at the top, under 'Build Phases'.
Select 'New run script phase'.
In the run script, paste
osascript /<file path>/simulator.scpt
Move 'Run scripts' under 'Target dependencies'.
This will bring the simulator to the front of all windows during build or unit testing.