Xcode 8 | iOS 10 simulator "Error returned in reply: Connection invalid"

36,163

Solution 1

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.

Solution 2

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

Solution 3

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.

Solution 4

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

Solution 5

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.

Share:
36,163
Ketan P
Author by

Ketan P

Mobile Application Developer. Swift Swift UI Flutter/ Dart Objective C Xamarin.Forms Certification: Certified Scrum Master, SAFe POPM

Updated on August 18, 2020

Comments

  • Ketan P
    Ketan P over 3 years

    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.