Veeru
Veeru

Reputation: 4936

Xcode 4.3.2, issue with running on simulator

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?

Upvotes: 35

Views: 8447

Answers (6)

Deepjyoti Roy
Deepjyoti Roy

Reputation: 482

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. !!

Upvotes: 5

Topsakal
Topsakal

Reputation: 447

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..

Upvotes: 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.

Upvotes: 0

Vineesh TP
Vineesh TP

Reputation: 7943

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

Upvotes: 0

Veeru
Veeru

Reputation: 4936

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.

Upvotes: 67

CodaFi
CodaFi

Reputation: 43330

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à!

Upvotes: 2

Related Questions