Reputation: 12106
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.
Upvotes: 9
Views: 2954
Reputation: 886
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:
So check the Scheme settings and set Debug configuration for Test action:
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
Upvotes: 3
Reputation: 11
Simply click on Quit Xcode from the editor menu of Xcode and open Xcode again. You will get the simulator.
Upvotes: 0
Reputation: 20590
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.
Upvotes: 0
Reputation: 34983
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.
Upvotes: 3