My Xcode 9 gives the message to which I don't know how to respond. I want to run the app to my simulator, and I am getting this weird message. Attaching the snapshot for the same.
-
Make sure that your simulator is closed & try again.– Imad AliJun 19, 2017 at 7:05
-
I just quit my Xcode and simulator and then delete derived data. and after that open Xcode and run the app worked for me.– ChandniSep 25, 2017 at 12:21
9 Answers
- If you are using two versions of Xcode, remove one or quit all Xcode and simulators.
- Go to preferences and Set proper version for command line tools
- click on Derived Data, go to Derived data and delete that folder or simply use
rm -rf ~/Library/Developer/Xcode/DerivedData
- Click on Simulator reset content settings and just quit XCode and simulator and open clear and build the Xcode and run it.
-
1"Set proper version for command line tools" was the one that fixed it for me. Aug 8, 2017 at 18:50
-
1Just restarting of the xcode works for me without deleting older xcode Sep 25, 2017 at 17:56
Swapping between 2 versions of Xcode (8.3.3 and 9 GM) gave me this problem in Xcode 9. Solved by Xcode->Preferences->Locations->Command Line Tools, set to Xcode 9. Needed to quit Xcode and the simulator, but it then worked.
I had the same issue:
Try to: - kill simulator (force quit)
if it won't work, restart mac - it is funny but for me it worked
Restart Xcode & Simulator. delete the app from simulator make clean & try to deploy again. it works for me.
It seems that there is error while Xcode is trying to connect with Simulator/Device in order to run app.
So there are multiple solution to this issue :
Clean project (shortcut :
cmd + shift + k
) / Clean Build project (shortcut :cmd + shift + alt + k)
Delete derived data content (Open Xcode preference using cmd + comma). Goto Location tab. In Derived Data section press on arrow symbol.
- Quit Xcode and Simulator
For me solution 3 worked!
Same error. For me running xcode-select
helped:
sudo xcode-select -s /Applications/Xcode-beta.app/Contents/Developer/
This is because you have multiple versions of Xcode in your system. Just quit all the other versions of xcode and also the simulators. Restart the required version of Xcode and it should work.
You need to select the latest version of the command line tools in the preference pane.