Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to run app in Simulator: Xcode beta 6 iOS 8

I am unable to launch my app on simulator using Xcode 6 beta and iPhone 5s simulator. First I am getting an error message from Simulator

"Unable to boot the iOS simulator"

and then after Xcode is showing me following error,

Unable to run app in Simulator
An error was encountered while running (Domain = DTiPhoneSimulatorErrorDomain, Code = 2)

Xcode Error

like image 577
Hemant Chittora Avatar asked Jun 04 '14 09:06

Hemant Chittora


3 Answers

I solved it following these steps:

  1. Open Xcode 6 beta
  2. Go to the menu Xcode > Open Developer Tool > iOS Simulator
  3. Even if an error dialog shows up, you still would have access to the iOS Simulator's menu
  4. Select Hardware > Device > Manage Devices
  5. Click on the little + sign at the bottom
  6. Add (if missing) all the devices that you want, or delete and recreate the ones malfunctioning.
  7. If anyone of the simulator is not working then right click on it and delete it and then re-create it again

enter image description here

like image 108
apascual Avatar answered Nov 12 '22 07:11

apascual


  • Make sure you choose Xcode 6 as Command Line Tools in Preferences > Locations Section

Xcode 6 Preferences

  • Make sure you open Xcode 6 from Applications not from the setup file.

  • Finally restarting Mac solve the problem in my case.

like image 44
ayalcinkaya Avatar answered Nov 12 '22 08:11

ayalcinkaya


After I found some solutions on the web, a combination of procedures worked for me:

  1. Close Xcode and iOS Simulator (and all related applications)

  2. Install (or reinstall) Xcode6-Beta to Applications folder (direct from the .dmg file)

  3. 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)

  4. Launch the iOS Simulator and go to iOS Simulator -> Reset Content and Settings...

  5. Close all the applications and restart your mac (I unchecked "Reopen windows...")

  6. Open Xcode6-beta and test the iOS Simulator

Good luck

like image 45
Alexandre Avatar answered Nov 12 '22 09:11

Alexandre