Xcode 8 | iOS 10 simulator "Error returns: Connection invalid"

While I try to run the application in the iOS 10 simulator using xcode8 , I often get these warnings. They randomly appear two at a time, and it is not clear what causes them.

Below is the image for the error I received.

Screen error.

I tried to follow things.

  • Clean and rebuild the application.
  • Restart xcode and simulator
  • Clear derived data and rebuild the application.
+46
ios xcode ios10 xcode8 ios-simulator
Sep 27 '16 at 10:40
source share
14 answers

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

I suppose this happened because both simulators were open, and this was decided when I closed my old simulator. The problem seems to be that xcode 8 was trying to establish a connection to the simulator.

+35
Oct 10 '16 at 15:14
source share

You just follow these steps to remove this error, which works great on my side, and I hope that these steps will help you and just give it a try.

  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) Install the correct version for command line tools (Xcode version)

vii) click Derived Data enter image description here

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

ix) Click on Simulator reset settings and just close xcode and simulator and open clarity and create xcode and run it.

+20
May 18 '17 at 10:15
source share

For Xcode 9 Beta strong> (in my case it was XCode 9 Beta 5) without deleting the Derived Data folder

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

  • Close Xcode, tools, Simulator.app and the console.
  • xcode - select the version you want to work with
  • Launch the version of Xcode you want to use

If these steps do not solve 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

+12
Aug 14 '17 at 16:28
source share

The same question I came across when I have two versions of Xcode, but the problem is that when we open two instances of the simulator, we get the same error, the best way to solve this problem is to run the command

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

to delete the received data.

+5
Apr 11 '17 at 6:33
source share

I had a similar problem, despite the fact that I did not run the second instance of the simulator, due to the use of SimPholders and the availability of Xcode command-line tools for another version of Xcode. To fix this, open the Xcode settings and on the Locality tab, make sure that the command line version matches the version of Xcode you are currently working on.

+5
Apr 30 '17 at 18:40
source share

I had a similar problem shown in the screenshot below.

Screenshot 1

Solved by closing Xcode 7 and its simulator.

It seems that when you work with Xcode 8 and its simulator, the Xcode 7 simulator should not remain open.

Below is a screenshot of the simulator status for Xcode 7 when you are working with Xcode 8.

Screenshot 2

+2
Oct 25 '16 at 7:36
source share

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

My solution: Close all versions of Xcode => Clear Derived Data => Quit Xcode => Open Xcode => Select File => Open Last.

+2
Mar 04 '17 at 11:12
source share

None of the above worked for me.

Instead of choosing a simulator and “running,” I decided to do it by first opening the “Open Developer Tool” menu. After that, everything worked fine.

enter image description here

+2
Sep 27 '17 at 10:49 on
source share

I had this problem when trying to debug an iOS application from Xamarin, which uses Xcode to run applications in a simulator. Initially, I focused on the 9.7-inch iPad Pro, tried to change the simulated device to iPad Air 2 (still on iOS 10), but the simulator did not respond. After exiting the game and restarting the simulator, it seemed to boot normally, so I changed to the previous device - not sure if the device changes really did something, but I did not see the error message several times when I started my application since.

0
Oct 07 '16 at 12:28
source share

Solved it by closing all xcode and the simulator. Do not ask me why. It was in beta for me

0
Aug 18 '17 at 8:46 on
source share

I had a similar problem, I did, I closed the simulator and the whole Xcode, and I went to the terminal and typed in to see how the Xcode application works, and I killed it. I had one Xcode running in the background.

To see if Xcode is running,

 ps -e | grep -i xcode 

Use kill comment to kill any Xcode application to run, I used

 kill -9 <pid> 
0
Aug 28 '17 at 18:25
source share

The same question that I encountered in my case, I stopped all applications and restarted my mac and everything is fine

0
Sep 18 '17 at 11:37 on
source share

Simple and quick remedies.

1. Wrap all xCode and reopen the xCode that you need to work ...

0
Sep 24 '17 at 10:05
source share

I also had this problem, but I did it below to make it work fine.

You have Xcode 8.xx and 9 on your Mac, which is causing the problem. Run only one Xcode at a time (close another Xcode, don't let another Xcode run in the background!).

0
Nov 10 '17 at 12:28
source share



All Articles