which is Xcode 12. However, if you are using Xcode 6, you might be able to disable the “Lost connection to iPhone” message by doing the following:
Open Xcode.
Go to the Preferences menu (Xcode > Preferences or Command + Comma).
Go to the Devices tab.
Uncheck the “Show Disconnect Alerts” option.
This will disable the “Lost connection to iPhone” message when you unplug an iOS device from your Mac.
Note: If you are using Xcode 6 and are having issues with the iOS Simulator, you might want to try resetting the iOS Simulator or deleting the app that you are testing from the iOS Simulator.