简体   繁体   English

无法在模拟器中运行应用程序:Xcode 6.0.1 iOS 8

[英]Unable to run app in Simulator : Xcode 6.0.1 iOS 8

I updated my Xcode to 6.0.1 from the App Store update notification in the morning in the os X 10.9.5, and then restarted my mac. 我在早上在os X 10.9.5中通过App Store更新通知将我的Xcode更新到6.0.1,然后重新启动了我的mac。

Then i found the Xcode has been updated to the 6.0.1 ,But when i tried to run my app on it i am getting only iOS device as the device,not simulators. 然后我发现Xcode已经更新到6.0.1,但是当我尝试在其上运行我的应用程序时,我只获得iOS设备作为设备,而不是模拟器。

in my simulator menu manage devices there is no simulators only my mac is present ,then i tried to add simulators but it has given me error of path is not found,i tried every solutions found in the web search like locations tab command line tools,everything is fine, 在我的模拟器菜单管理设备没有模拟器只有我的mac存在,然后我试图添加模拟器,但它已经给我错误的路径找不到,我尝试在网络搜索找到的每个解决方案,如位置选项卡命令行工具,一切都好,

But still i am not getting the simulators?Can anybody help me on this? 但是我仍然没有得到模拟器?有人可以帮助我吗?

Might be that resolve by tap Xcode6--> Window--> Device like following image: 可能是通过点击Xcode6--> Window--> Device ,如下图所示:

在此输入图像描述

When you select Device Option you get following window open: 选择“设备选项”后,将打开以下窗口:

在此输入图像描述

There is appear all simulator or connected devices. 出现所有模拟器或连接设备。 If you found No simulator you can add by click on + Button then you get following window create simulator. 如果您发现没有模拟器,您可以通过单击+按钮添加,然后您将获得以下窗口创建模拟器。

在此输入图像描述

click an option there is simulator list and you get simulator. 单击一个选项有模拟器列表,你得到模拟器。 Hope that solve you issue. 希望能解决你的问题。

Choose Preview > iOS Simulator Version > iOS 6.0 or 6.1.* Choose Preview > Preview in iOS Simulator. 选择“预览”>“iOS模拟器版本”>“iOS 6.0或6.1”。*在iOS模拟器中选择“预览”>“预览”。

  • If you don't see iOS 6.0 or iOS 6.1, see Downloading and Installing Xcode Components in the iOS Developer Library. 如果您没有看到iOS 6.0或iOS 6.1,请参阅iOS Developer Library中的下载和安装Xcode组件。

What is the output of 'xcrun simctl list'? 'xcrun simctl list'的输出是什么? Is there anything interesting in ~/Library/Logs/CoreSimulator/CoreSimulator.log to indicate a problem? 在〜/ Library / Logs / CoreSimulator / CoreSimulator.log中有什么有趣的东西来表示问题吗? Are you able to add and delete simulator devices from the device manager? 您是否可以从设备管理器添加和删除模拟器设备? Can you add and delete devices from the command line 'xcrun simctl create ...'? 您可以从命令行'xcrun simctl create ...'添加和删除设备吗?

The one thing I can suggest is checking xcode-select from a Terminal. 我可以建议的一件事是从终端检查xcode-select。 Type xcode-select -p and look at the output. 输入xcode-select -p并查看输出。 This should be the Contents/Developer directory within your Xcode application. 这应该是Xcode应用程序中的Contents / Developer目录。 On my machine - because I don't leave Xcode in the Application folder, it reads /Applications/Developer/Xcode.app/Contents/Developer/ . 在我的机器上 - 因为我没有将Xcode留在Application文件夹中,它会读取/Applications/Developer/Xcode.app/Contents/Developer/ Make sure it's actually pointing at where Xcode is installed. 确保它实际上指向安装Xcode的位置。 For example you may be putting Xcode in a directory other than the usual /Applications, while xcode-select is looking for the Xcode internals in a different place than where Xcode is. 例如,您可能将Xcode放在通常/ Applications之外的目录中,而xcode-select正在寻找与Xcode不同的地方的Xcode内部。 I've been caught out by this before now. 我之前已经被这个骗过了。

Follow these steps to add a (new) simulator 请按照以下步骤添加(新)模拟器

  1. Click on Simulator icon and open simulator list. 单击模拟器图标并打开模拟器列表。
  2. At the end of list, there is an option to add new simulator " Add Additional Simulator ". 在列表的末尾,有一个选项可以添加新的模拟器“ 添加附加模拟器 ”。 That will open 'Device & Simulator' window. 这将打开“设备和模拟器”窗口。
  3. Switch to 'Simulator' tab. 切换到“模拟器”选项卡。
  4. There are three field in simulator tab. 模拟器选项卡中有三个字段。
  5. Click on '+' icon, on left bottom corner of window. 点击窗口左下角的“+”图标。
  6. Simulator Name: Enter simulator name here 模拟器名称: 在此处输入模拟器名称
  7. Device Type: Select iPad from this dropdown list 设备类型: 从此下拉列表中选择iPad
  8. OS Version: Select OS version from this dropdown list 操作系统版本: 从此下拉列表中选择操作系统版本
  9. Click on 'Create' 点击“创建”

A new simulator will be added in your Simulator option list. 将在模拟器选项列表中添加一个新的模拟器。

Look at this snapshot to understand flow of above steps: 查看此快照以了解上述步骤的流程: 在此输入图像描述

And if there is no simulator/OS version in simulator list, you're looking for, 如果模拟器列表中没有模拟器/操作系统版本,那么您正在寻找,

  1. Click on Simulator icon and open simulator list. 单击模拟器图标并打开模拟器列表。
  2. At the end of list, there is an option to add new simulator " Download Simulator ". 在列表的末尾,有一个选项可以添加新的模拟器“ 下载模拟器 ”。 That will open 'Component' window (from Xcode >> Preferences). 这将打开'Component'窗口(来自Xcode >> Preferences)。
  3. Select/click simulator from list, which you need to download. 从列表中选择/单击模拟器,您需要下载。

Look at this snapshot: 看看这个快照: 在此输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM