Unable to run app in Simulator
An error was encountered while running (Domain = DTiPhoneSimulatorErrorDomain, Code = 2)
国外大神的办法:
-
Close Xcode and iOS Simulator (and all related applications)
-
Install (or reinstall) Xcode6-Beta to Applications folder (direct from the .dmg file)
-
Open Xcode6-Beta and go to Xcode -> Preferences -> Locations -> Command Line Tools and select "Xcode 6.0" (be sure that you've selected the one in Applications folder)
-
Launch the iOS Simulator and go to iOS Simulator -> Reset Content and Settings...
-
Close all the applications and restart your mac (I unchecked "Reopen windows...")
-
Open Xcode6-beta and test the iOS Simulator