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

2020-01-23 03:24发布

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

22条回答
\"骚年 ilove
2楼-- · 2020-01-23 03:47

i was facing the same problem, what i done is I downloaded simulator for IOS7 what you need to do is go to:- 1.Xcode->preferences->Downloads->Components 2.after that in your project under general settings-select Deployment target as 7.0 3.the last thing is select any simulator under 7.0 :)

查看更多
聊天终结者
3楼-- · 2020-01-23 03:48

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

查看更多
▲ chillily
4楼-- · 2020-01-23 03:48

Clean -> Run fixed it for me.

I've tried the rest, nothing helped. Although it may be required too.

查看更多
混吃等死
5楼-- · 2020-01-23 03:49

For me, I simply hadn't updated Xcode from the Developer Center which was now Xcode 6 beta 6. I'd gotten spoilt with the automated App Store updates, and forgot about ye old manual download process.

查看更多
淡お忘
6楼-- · 2020-01-23 03:50
  • 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.

查看更多
Fickle 薄情
7楼-- · 2020-01-23 03:50

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

查看更多
登录 后发表回答