Bring iPhone Simulator to front of screen on build? - iphone

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.

Related

Eclipse doesn't run my project

In Eclipse I tried to run my project with Ctrl + F11 (Button Run in menu I also checked). Then coming Android Device Chooser, I choose my phone and wait my app running. But nothing happens. I checked with another project, and it works good, application was running in my phone. Why does it happen?
Thanks.
In Eclipse look at the out put from Console and LogCat.

Is possible build an iPhone project from mac os x terminal and without an xcode project?

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.

Applescript Xcode to clean, build and install on iPhone device

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.

error issue on the debugging process

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.

Build to iPhone Simulator from TextMate

I have the Xcode bundle for TextMate and the Build and Run with XCode work fine but is there a way to pass Active Target, Active SDK or configuration into the build in order to launch the simulator?
I have tried setting shell vars in the prefs pane but no luck.
Thanks.
Found at http://hexperimental.com/content/coding-iphone-apps-textmate
I haven't tested this myself, but this guy suggests setting TextMate as your editor of choice in xcode and then changing the run shortcut to use applescript to send keyboard shortcuts
Open the Bundle editor ( Bundles > Bundle Editor > Show Bundle editor ), the xcode bundle is all the way down, select the Run command and change the Command to this:
osascript -e 'tell application "Xcode"
activate
end tell
tell application "System Events"
key code 15 using {command down, shift down}
key code 15 using {command down}
end tell'
#I'm leaving the old command commented below just in case.
#PROJECT=$(ruby -- "${TM_BUNDLE_SUPPORT}/bin/find_xcode_project.rb")
#if [[ -f "${PROJECT}/project.pbxproj" ]]; then
# "${TM_BUNDLE_SUPPORT}/bin/run_xcode_target.rb" -project_dir="$PROJECT"
#else
# echo "Didn't find an Xcode project file."
# echo "You may want to set TM_XCODE_PROJECT."
#fi