Xcode 5 says "Simulator in Use" when running 64-bit Unit tests

2.9k Views Asked by At

I just downloaded and installed Xcode 5 GM seed. I removed the previous Xcode (DP5). When I open my project, select "iPhone Retina (4-inch 64 bit)" and type Command-U to run my SenTeskingKit unit tests, Xcode invariably complains:

"Simulator in Use - The Simulator can't be launched because it is already in use."

I have run xcode-select to point to the new Xcode, restarted my MacBookPro, and made sure there are no other iPhone sim processes running under the Activity Monitor.

4

There are 4 best solutions below

0
On

Simply click on Quit Xcode from the editor menu of Xcode and open Xcode again. You will get the simulator.

2
On

I had the same problem and found the reason.

Testing on the 64-bit Simulator needs Build Active Architecture Only to be YES.

By default this setting is YES for Debug and NO for Release:

Build Active Architecture settings

So check the Scheme settings and set Debug configuration for Test action:

enter image description here

Alternatively you can test from command line:

xcodebuild  -project {project}.xcodeproj -scheme {scheme} -sdk iphonesimulator -destination platform="iOS Simulator",OS=7.0,name="iPhone Retina (4-inch 64-bit)" -configuration Release ONLY_ACTIVE_ARCH=YES test
2
On

With Xcode 5 Version 5.0 (5A1413), I cannot run 64-bit unit tests at all. Always gives a "Simulator in use" error alert.

Quitting Xcode or the Simulator does not help.

My "solution", thanks to this question, is to run the tests against the 32-bit simulator.

0
On

I get this all the time and the only thing that seems to guarantee to fix it is restarting both Xcode and the Simulator. Sorry I don't have a better answer.

EDIT: Sometimes just changing device (e.g. from iPhone to iPad or from retina to non-retina) is sufficient.