Question

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.

Was it helpful?

Solution

Include a compiled AppleScript in your build process:

tell application "iPhone Simulator"
activate
end tell

OTHER TIPS

  1. Create a new AppleScript file e.g. simulator.scpt and add this code:

    tell application "Simulator"
        activate
    end tell
    
  2. Compile and export as a script, optionally code sign it.

  3. In Xcode, select the target, click + at the top, under 'Build Phases'.

  4. Select 'New run script phase'.

  5. In the run script, paste

    osascript /<file path>/simulator.scpt
    
  6. Move 'Run scripts' under 'Target dependencies'.

This will bring the simulator to the front of all windows during build or unit testing.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top