Software caused connection abort. Error returned in reply:Connection invalid
- 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.
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.
Restart Xcode & Simulator. delete the app from simulator make clean & try to deploy again. it works for me.