35

I have been having this weird problem with Xcode 4.3.2, of course after the recent update.

After successfully building and running on the simulator several times, xcode seems to not be able to connect to the simulator and can't even stop the project; it's like the simulator does not exist. I have tried:

  1. Stopping the project – doesn't work.
  2. Quitting the simulator – doesn't work, xcode still shows it's running on the simulator even when I quit the simulator.
  3. Cleaning the project – doesn't work.

I have to force quit xcode to get it communicate with the simulator. Nothing else works. It gets quite frustrating to do it every half an hour. This only started with 4.3.2.

I always stop before building and running, so it is not an issue of simulator/xcode getting thrashed by me.

Any suggestions?

9
  • This happens to me occasionally too, I haven't found a cure, I think it's just a bug in this latest release. Apr 16, 2012 at 5:07
  • 3
    If it's occasional i might be able to live with it, for me its more like once in every 10 times i try to build/run on the simulator. And CodaFi, am sure you wont be very happy restarting your mac every half an hour!
    – Veeru
    Apr 16, 2012 at 5:09
  • What I find is the if you don't kill the process between builds and runs, it duplicates itself in the sim and then the sim hangs.
    – CodaFi
    Apr 16, 2012 at 5:12
  • 2
    Are you pressing stop before running the project again? If not try doing that...I can't remember ever having this problem with the same version of XCode ^^;
    – borrrden
    Apr 16, 2012 at 5:13
  • 3
    Apple needs to seriously fix this. It is SO annoying. Specially when you have several projects running, you have to kill them all!
    – Hahnemann
    Mar 22, 2013 at 23:00

6 Answers 6

67
+50

I have found by chance, it is not a solution by any means -

When xcode hangs, saying it is running the app, but nothing is on simulator, opening the simulator from the dock by clicking on the dock icon (not using command+tab) seems to work.

It is very weird,but it works; atelast till xcode fixes it.

5
  • thanks!! at last found a workaround for a bug that's sometimes very annoying
    – aloha
    Dec 6, 2012 at 20:44
  • 1
    This is the best iOS-related development advice I've ever get. :) Feb 20, 2013 at 11:19
  • Brilliant. Had this issue so many times the last weeks and restarting Xcode every time is very annoying.
    – mAu
    Mar 23, 2013 at 14:07
  • Thanks so much, it saved a lot of time for me Apr 10, 2013 at 15:14
  • I have been frustrated with the simulator unable to see anything on TCP/IP, including the Safari app. This work around is helping. I can get about 3 or 4 debugging sessions in before the network stops responding. This is new for me with 4.6.3.
    – darren
    Jun 28, 2013 at 4:47
5

I had the same damn issue on XCode 4.5.1, but I resolved it just now. When the program is running, it gets compiled but doesn't show anything on the simulator. just click on iOS Simulator icon in dock in order to bring it to front. Click iOS Simulator on top left -> Reset content and settings -> then force quit the iOS Simulator and run the program again. !!

2

Besides a restart, there is one other way I've managed to get around this:

Let's say your app hangs, go to the targets selector in the top of the Xcode window and change your sim target to a new SDK (or if you don't have another SDK, change it to a universal app and run on the opposite device simulator).

Then, when your app loads on the new device/OS completely, quit the sim, change your targets back, et voilà!

3
  • Thanks for the tip codafi, but i was hoping i dont have to do that every now and then. That would definitely put a dent in my productivity. I was hoping there is some solution out there, that fixes xcode itself.
    – Veeru
    Apr 16, 2012 at 6:30
  • @CodaFi, this used to work for me up through Xcode 4.5.2, but i think i have found that it no longer works in Xcode 4.6 . does it still work for you?
    – john.k.doe
    Feb 26, 2013 at 21:54
  • @john.k.doe I've noticed it no longer works in Xcode 5 as well. Unfortunate.
    – thegrinner
    Mar 31, 2014 at 17:50
0

Uninstall application from Simulator and again run. Then it will works fine :)

0
0

This has frustrated me for -years- now but stumbled across what appears to get things going again for me:

Hide the simulator (iOS Simulator -> Hide iOS Simulator) or Cmd-H, then reopen the simulator.

The problem seems to happen when something CPU intensive is happening in the background (like a Time Machine backup) on my old 2 core MacBook.

0

Xcode 4.6.3 update (June 13, 2013) resolves the following issue:

  • Hang when debugging in iOS Simulator on OS X 10.8.4. 13722320

https://developer.apple.com/library/mac/#releasenotes/DeveloperTools/RN-Xcode/

You can try to update your Xcode to see if that works for you..

0

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.