1

I was working on an iOS app in xCode and I was perfectly using the simulator. Yesterday I had to create a new project and after putting some code I found out that when clicking Run, the app compiles, links, but then the simulator never starts. And stop is disabled. I tried with both iOS sim on and off. Opening the old project back shows the simulator but after switching to the new one, nothing happens. Any ideas on how to fix this? I am using a Single-View app.

DaKnOb
  • 577
  • 4
  • 17

4 Answers4

3

We switch between apps all the time in Xcode, and you're not crazy - it's definitely fickle (which seems ridiculous). Try this:

  • Clean (⌘ + shift + k)
  • Restart Xcode

...if that doesn't work, we've also had to clean out the local caches à la ⌘ + option + shift + k or even deeper, as described in this answer.

Hopefully those will help!

Community
  • 1
  • 1
jterry
  • 6,209
  • 2
  • 30
  • 36
  • Thanks for your input. Methods used here did not seem to work. I'll check the link for more info and maybe come back to you later. #Update: None of the techniques mentioned works for me. – DaKnOb May 30 '13 at 15:47
1
  1. Clean the Xcode project.
  2. Select the Simulator and do "Reset Contents and Settings"
  3. Shut down Xcode and Simulator.
  4. Restart Xcode and run your app.

(And sometimes, if you use Activity Monitor, you will find a Simulator process still running when it's supposed to be shut down. Kill that with Activity Monitor and restart everything.)

(Also, although the theory is that it can't happen, sometimes the Mac runs out of available thread handles. Then you need to reboot the Mac.)

Hot Licks
  • 47,103
  • 17
  • 93
  • 151
  • Did these already. Tried both quitting the two processes and force-quitting them, so I guess I covered everything. Thanks for helping. – DaKnOb May 30 '13 at 15:45
1

The problem has been fixed eventually.
Near the Run, Stop buttons, click the app name, for example Demo and then click Edit Scheme. Now click Info and then set the Executable to your app executable, usually in the only subfolder of the default location. Click Okay and feel free to run the simulator. It will now work just as well.

DaKnOb
  • 577
  • 4
  • 17
0

Seems like an odd issue to have. I'd close Xcode and the iOS Simulator completely and try again. Worst case would be to reboot system. Shouldn't be any reason a new project wouldn't run.

Bill Burgess
  • 14,054
  • 6
  • 49
  • 86