I just installed Xcode 4.3 and I'm having some issues with stopping my app while running in the iOS simulator. I'm able to quit the simulator, but I cannot stop the task from running, either by hitting the stop button, or using the keybinding. In order to stop the process, I literally have to quit Xcode and restart. This obviously makes any development at all very difficult. I found this bugreport: link, which sounds very similar to the issue I'm seeing.
Is this a known issue with 4.3, or has anyone else experienced this behavior? I haven't used Xcode for over a year now (v3), so I can't say if it was working with any other previous versions of Xcode 4.
Found this post helpful XCode 4.3.2, issue with running on simulator
Strangely when it hangs, click on the simulator icon in the tray. Dont ask me why. This actually works
I've noticed this a lot since updating. The cure seems to be to just try to remember to stop the application from within Xcode while the simulator is still running the app. It seems like when you kill the simulator out from under Xcode your simulator process hangs and doesn't pass the termination message on to Xcode like it is supposed to.
I can confirm this is still the case with Xcode 4.4 on Mountain Lion, unfortunately.
If I close the iOS simulator with Cmd+Q rather than leaving it open and stopping the simulation with the "Stop" button on the Xcode toolbar, the following things happen (although not systematically, but in 25% of the cases launching the same application - I believe this is related to application status but I have not understood how yet):
I've been having a similar problem which can be resolved by restarting Xcode, but it's quite annoying. I've managed to get a workaround for this 'problem'.
Go to
~/Applications/
and open the context menu for Xcode.app and selectShow Package Contents
Navigate to
/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/
Copy
iOS Simulator.app
and paste it to (for instance) your DesktopNext start your OSX system preferences panel and navigate to
Keyboard
Select the second tab
Keyboard Shortcuts
Select
Application Shortcuts
on the left sidePress the small
+
sign on the right sideA small dialog appears.
Select the copied
iOS Simulator.app
in the first selectbox >Other...
As
Menu Title
fill inHome
And for the menu shortcut 'type'
COMMAND + Q
Now hit
Add
and close your system preferencesDelete
iOS Simulator.app
from your Desktop.If you now start the simulator through Xcode and (accidentally) want to quit the simulator while it's running and attached to Xcode > you can't.
I know it doesn't fix the problem itself, but for those pro-users who use keyboard shortcuts for everything this might help a bit.
Not really a solution, but I just overrode the “Quit iOS Simulator” keyboard shortcut in System Preferences to something I’m unlikely to type impulsively, like ⌘⌥Q.