67

While I am try to run an app in the iOS 10 simulator using xcode8 I get these alerts frequently. They randomly appear two at a time and it is not apparent what is triggering them.

Below is Image for Error I got.

Error Screen shot.

I tried Following things.

  • Clean & Rebuild an app
  • Restart xcode & Simulator
  • Clear Derived Data & Rebuild application.
Ketan P
  • 4,259
  • 3
  • 30
  • 36

17 Answers17

59

Even I was getting the same error. Issue in my case was I was working on xcode 7.3 and its simulator was open, later on I closed xcode 7 and opened xcode 8 and tried running app and got the above error.

I guess its happening because of both the simulator were open, it got solved when I closed my older simulator. Seem to be some problem while xcode 8 was trying to establish connection with simulator.

Ketan P
  • 4,259
  • 3
  • 30
  • 36
28

You just follow these steps to remove this error it's working fine in my side and i hope these steps work to you also just try it.

 i)Remove multiple xcode versions.
ii)Quit all Xcode and simulators. 
iii)Only one version you opened.
iv)Go to Xcode  -> Preferences

enter image description here

v)Go to Location enter image description here vi) Set proper version for command line tools (your Xcode version)

vii)click on Derived Data enter image description here

viii)Then go to Derived data and delete that folder. see below image enter image description here

ix) Click on Simulator reset content settings and just quit xcode and simulator and open clear and build the xcode and run it.

Charlton Provatas
  • 2,184
  • 25
  • 18
  • For me (Xcode 9b), going through the steps other people listed - setting Command Line tools to the right version, deleting derived data - worked only after restarting my computer. – green_knight Jun 12 '17 at 05:35
  • For me , I'm using Xcode 9 beta , so the straightforward solution is changed the Command Line Tools to Xcode 9-beta in Xcode 9 beta Preferences . It works for me. – Johnny Jun 15 '17 at 04:05
  • my problem solved by following steps from 1-6 only.Help me alot. – bittu Feb 07 '18 at 10:54
13

Without deleting "Derived data" folder

The same rules as in the past apply to switching between Xcode 8 and Xcode 9:

  1. Quit Xcode, Instruments, Simulator.app, and Console
  2. xcode-select the version you want to work with
  3. Start the version of Xcode you want to use

If these steps don't resolve the problem for you, you can repeat the steps above > but after #2 add "sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService".

from this https://forums.developer.apple.com/thread/79301

Kiryl Bielašeŭski
  • 2,663
  • 2
  • 28
  • 40
8

The Same issue I have faced when I have two Xcode version, but the issue was when we are opening the two instances of simulator we will get the same error, the best way to solve this issue is run command

rm -rf ~/Library/Developer/Xcode/DerivedData 

to remove the derived data.

Forge
  • 6,538
  • 6
  • 44
  • 64
Sagar Daundkar
  • 320
  • 3
  • 13
8

None of the above worked for me.

Instead of choosing the simulator and hitting "run" i solved it by opening the simulator form "Open Developer Tool" menu first. After that all worked fine.

enter image description here

user1244109
  • 2,166
  • 2
  • 26
  • 24
6

I had a similar issue, despite not launching a second instance of the simulator, due to using SimPholders and having the XCode Command Line Tools set to a different version of XCode. To resolve this, open up XCode preferences, and under the Locations tab ensure that the Command Line Tools version matches what version of XCode you're currently working in.

Ryan
  • 61
  • 2
  • 3
2

I had the similar issue shown in below screenshot.

Screenshot 1

Got it solved by closing Xcode 7 and its simulator.

It seems that when you are working on Xcode 8 and its simulator then Xcode 7 simulator should not remain open.

Below is screenshot of simulator state for Xcode 7 when you're working on Xcode 8.

Screenshot 2

Jayprakash Dubey
  • 35,723
  • 18
  • 170
  • 177
2

In my case, I was open a project a Xcode 8, and the emulator for this version, then open this project on Xcode 7.3.1, when I create an emulator it shows the alert.

My Solution: Close all version of Xcode => Clear Derived Data => Quit Xcode => Open Xcode => Choose File => Open Recent.

BaoDen
  • 21
  • 2
1

I had similar issue, what I did is I closed the simulator and all the Xcode and I went to the terminal and typed to see any Xcode application running then I killed it. I had one Xcode running in the background.

Command to see if Xcode is running,

ps -e | grep -i xcode

Use kill comment to kill any runing Xcode app, I used

kill -9 <pid>
trsquare lab
  • 131
  • 1
  • 2
1

Force Quit.. Xcode and simulator. This kind of issue happned because maybe you are try to run more than one different version Xcode at same time.

Arjun Patel
  • 1,394
  • 14
  • 23
0

I just had this issue when attempting to debug an iOS application from Xamarin, which uses Xcode to run apps in the simulator. I was initially targeting a 9.7" iPad Pro, attempted to change the simulated device to an iPad Air 2 (still on iOS 10), but the simulator didn't respond. After quitting and relaunching the simulator it appeared to load okay, so I changed back to the previous device - not sure whether changing devices actually did anything but I haven't seen the error message in the few times I've run my app since.

Ade Stringer
  • 2,611
  • 17
  • 28
0

Solved it by closing all xcode and simulator. Don't ask me why. It was happening on the beta version for me

user1872384
  • 6,886
  • 11
  • 61
  • 103
0

The Same issue I have faced in my case i stopped all applications and restarted my mac and every thing is OK

taha
  • 769
  • 6
  • 5
0

Simple And fast Remedies..

1.Quit all xCode and reopen the xCode which you need to work...

abdul sathar
  • 2,395
  • 2
  • 28
  • 38
0

I had this problem too, but I did below process it's working fine.

You have both Xcode 8.x.x and 9 running on your Mac, which causes the problem. Only run one Xcode at a time (Quit another Xcode, don't let another Xcode runing in background!).

Venkatesh G
  • 354
  • 1
  • 4
  • 10
0

This can occur when you have more than one version of Xcode installed on your computer. Make sure you QUIT (not just close) all versions of Xcode first.

0

Changing the device seems to have worked for me after doing the other stuff. Didn't have to restart my computer.

user3499381
  • 467
  • 1
  • 4
  • 12