简体   繁体   English

使用 iOS 8 beta 版打开 iOS 模拟器时出错:“无法启动 iOS 模拟器”

[英]Error opening iOS Simulator with iOS 8 beta version: "Unable to boot the iOS Simulator"

I recently installed the beta of Xcode Version 6 in OS X Mavericks, with which comes the iOS simulator for iOS 8. I've managed to successfully run from Xcode 6 beta on a device with iOS 8 Beta, but opening the simulator always get the same error I have tried to change the hardware version of iPhone 4s, iPhone 5, ... in the simulator and still gives the same error: "Unable to boot the iOS Simulator". I recently installed the beta of Xcode Version 6 in OS X Mavericks, with which comes the iOS simulator for iOS 8. I've managed to successfully run from Xcode 6 beta on a device with iOS 8 Beta, but opening the simulator always get the同样的错误我试图在模拟器中更改 iPhone 4s、iPhone 5 的硬件版本,但仍然给出相同的错误:“无法启动 iOS 模拟器”。

在此处输入图像描述

I'm working with Xcode 5.1 at the same time in Mavericks, any suggestion to solve this?我正在小牛队同时使用 Xcode 5.1,有什么建议可以解决这个问题吗? Is a possible problem for run this simulator in Mavericks because is only for OS X 10.10?因为仅适用于 OS X 10.10,所以在 Mavericks 中运行此模拟器是否可能存在问题? Thanks.谢谢。

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)关闭 Xcode 和 iOS Simulator(以及所有相关应用程序)

  2. Install (or reinstall) Xcode6-Beta to Applications folder (direct from the .dmg file)将 Xcode6-Beta 安装(或重新安装)到 Applications 文件夹(直接从 .dmg 文件)

  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)打开 Xcode6-Beta 并转到 Xcode -> Preferences -> Locations -> Command Line Tools 并选择“Xcode 6.0”(确保您已选择 Applications 文件夹中的那个)

  4. Launch the iOS Simulator and go to iOS Simulator -> Reset Content and Settings...启动 iOS 模拟器并转到 iOS 模拟器 -> 重置内容和设置...

  5. Close all the applications and restart your mac (I unchecked "Reopen windows...")关闭所有应用程序并重新启动您的 mac(我取消选中“重新打开窗口...”)

  6. Open Xcode6-beta and test the iOS Simulator打开 Xcode6-beta 并测试 iOS 模拟器

Good luck祝你好运

I also had this problem and found the solution by doing following steps:我也遇到了这个问题,并通过执行以下步骤找到了解决方案:

  1. Initially i downloaded Xcode 6 library in Documentation section under the path Xcode --> Preferences --> Downloads and restart my xcode but didn't solve my problem.最初,我在 Xcode --> Preferences --> Downloads 路径下的文档部分下载了 Xcode 6 库,然后重新启动我的 xcode,但没有解决我的问题。

  2. Downloaded and installed the iOS 7.1 Simulator under the path Xcode --> Preferences --> Downloads.在路径 Xcode --> Preferences --> Downloads 下下载并安装 iOS 7.1 Simulator。 Restart xcode again and the problem solved.再次重启xcode,问题解决。

  3. I am facing same issue again next morning.第二天早上我再次面临同样的问题。 Unsetting the DYLD_INSERT_LIBRARIES variable solves my problem:-取消设置 DYLD_INSERT_LIBRARIES 变量解决了我的问题:-

    1. Open terminal and type "sudo vi /etc/launchd.conf" command and press Enter打开终端并输入“sudo vi /etc/launchd.conf”命令并按Enter
    2. Press I "Insert" mode and change this按 I“插入”模式并更改此

      "setenv DYLD_INSERT_LIBRARIES /usr/lib/libimckit.dylib"

      to this对此

      "unsetenv DYLD_INSERT_LIBRARIES /usr/lib/libimckit.dylib"

    and press esc to exit from insert mode.然后按 esc 退出插入模式。

    1. Save changes by typing ":wq" Press Enter通过键入“:wq”保存更改按 Enter
    2. Reboot your system and problem soloved.重新启动系统并解决问题。

在此处输入图片说明

Prior to that I didn't find any iOS version in front of each listed devices but after installation or by unsetting DYLD_INSERT_LIBRARIES variable I found the same in front of each device.在此之前,我没有在每个列出的设备前面找到任何 iOS 版本,但在安装或取消设置 DYLD_INSERT_LIBRARIES 变量后,我在每个设备前面找到了相同的版本。

在此处输入图片说明

I solved by removing and re-adding the simulators see screenshots here.我通过删除并重新添加模拟器解决了这里的截图。

https://stackoverflow.com/a/25387715/1565615 https://stackoverflow.com/a/25387715/1565615

I don't believe your issue is related to running Xcode 6 in Mavericks, as I encountered the same error on OS X 10.10.相信你的问题涉及到在小牛运行Xcode中6,如我遇到在OS X 10.10相同的错误。

After a bit of toying around with XCode and the iOS Simulator, the only fix I found was simply restarting the computer, and the error hasn't appeared since.在对 XCode 和 iOS 模拟器进行了一番折腾之后,我发现的唯一解决方法就是重新启动计算机,此后该错误就再也没有出现过。

Try a reboot and then see if you can get things up and running.尝试重新启动,然后查看是否可以启动并运行。

(On a side note, after restarting just XCode (not the OS), I lost the option to run on the simulator at all—the reboot also fixed this problem, if anyone here encounters anything similar). (附带说明一下,在仅重新启动 XCode(而不是操作系统)之后,我完全失去了在模拟器上运行的选项——如果有人遇到类似问题,重新启动也解决了这个问题)。

In Xcode go to the Xcode menu->Open Developer Tool - IOS Simulators.在 Xcode 中,转到 Xcode 菜单 -> Open Developer Tool - IOS Simulators。 Choose simulator and then go hardware->device->manage device.选择模拟器,然后去硬件->设备->管理设备。

If the troubled device shows in the left column, delete it.如果出现问题的设备显示在左栏中,请将其删除。 Then add the device back from the '+' button.然后从“+”按钮添加设备。 If it wasn't there in the first place, simply add it using the '+' button.如果它首先不存在,只需使用“+”按钮添加它。

I had previously deleted ~/Library/Developer/CoreSimulator/ directory and the only command that worked for me is xcrun simctl erase all .我之前删除了~/Library/Developer/CoreSimulator/目录,唯一对我xcrun simctl erase all命令是xcrun simctl erase all Perhaps you might want to give this a try.也许您可能想尝试一下。

No need to download a new ios version.无需下载新的 ios 版本。 All you need is to go to About this Mac > Storage > Manage > Delete XCode Cache .您需要的只是 go 到About this Mac > Storage > Manage > Delete XCode Cache And, it works for me而且,它对我有用

In latest OS version About this Mac > Storage > Manage > Developer > select Xcode cache > Click delete button在最新的操作系统版本中关于此 Mac > 存储 > 管理 > 开发人员 > select Xcode 缓存 > 单击删除按钮

I've faced same issue and solved by below steps:我遇到了同样的问题并通过以下步骤解决:

1) Move xcode6-beta into application folder 1) Move xcode6-beta Move到应用程序文件夹中

2) Restart mac and open xcode6-beta from application folder. 2) Restart mac 并从应用程序文件夹中打开 xcode6-beta。

我也有同样的问题,但通过安装所需的模拟器解决了(Xcode > 首选项 > 下载 > 安装模拟器)

This happened to me running the simulator on both Xcode 7 and 8 on El Capitan.这发生在我在 El Capitan 的 Xcode 7 和 8 上运行模拟器时。 The only thing that worked was disabling System Integrity Protection ( https://apple.stackexchange.com/a/208481/86757 ).唯一有效的是禁用系统完整性保护 ( https://apple.stackexchange.com/a/208481/86757 )。

I tested an awful quantity of solutions and the only one which worked for me was disabling root protection through Recovery Mode.我测试了大量的解决方案,唯一对我有用的解决方案是通过恢复模式禁用根保护。 I tested it with XCode 7.3, it's possible that this approach may work for XCode 8.我用 XCode 7.3 对其进行了测试,这种方法可能适用于 XCode 8。

  • Reboot and hold the keys cmd + R prior to show the loading view with Apple Logo在显示带有 Apple 标志的加载视图之前,重新启动并按住cmd + R
  • When you are on Recovery Mode, go to Menu and choose Terminal当您处于恢复模式时,转到菜单并选择终端
  • Type csrutil disable键入csrutil disable
  • Reboot the machine and run the simulator again.重新启动机器并再次运行模拟器。

I am adding this answer as it seems to be slightly different from the others.我正在添加这个答案,因为它似乎与其他答案略有不同。

Due to working on an older project I needed to download and run Xcode 7.3 and load the project in simulator - this yielded the "Unable to boot the iOS Simulator" error.由于处理旧项目,我需要下载并运行 Xcode 7.3 并在模拟器中加载项目 - 这产生了“无法启动 iOS 模拟器”错误。

I completed all the above suggestions and none of them worked (reset simulator setting, restarted, deleted and reinstalled Xcode, reset the simulator location, restarted again etc)我完成了上述所有建议,但都没有奏效(重置模拟器设置、重新启动、删除并重新安装 Xcode、重置模拟器位置、再次重新启动等)

In the end the issue was that I was trying to load the iPhone 5 (10.0) simulator on Xcode 7.3.最后的问题是我试图在 Xcode 7.3 上加载 iPhone 5 (10.0) 模拟器。

You can see here the Apple release notes for Xcode 7.3您可以在此处查看 Xcode 7.3 的 Apple 发行说明

Xcode 7.3 requires a Mac running OS X 10.11 or later. Xcode 7.3 需要运行 OS X 10.11 或更高版本的 Mac。

Xcode 7.3 includes SDKs for iOS 9.3, watchOS 2.2, OS X version 10.11.4, and tvOS 9.2. Xcode 7.3 包括适用于 iOS 9.3、watchOS 2.2、OS X 10.11.4 和 tvOS 9.2 的 SDK。

As you can see Xcode 7.3 doesn't include an SDK for iOS 10.0如您所见,Xcode 7.3 不包含适用于 iOS 10.0 的 SDK

This meant as soon as I loaded the simulator with iPhone 5 (9.3) it worked immediately.这意味着一旦我用 iPhone 5 (9.3) 加载模拟器,它就会立即工作。

I would therefore recommend when approaching this issue not to get railroaded (as I did) in thinking that something is wrong with the system before checking the basic things.因此,我建议在处理此问题时,在检查基本内容之前不要认为系统有问题(就像我所做的那样)。

Note: It is also worth noting that the simulator must be configured to the Xcode version being used.注意:还值得注意的是,模拟器必须配置为正在使用的 Xcode 版本。 This can be set in这可以设置在

Xcode -> Preferences -> Locations -> Command Line Tools

在此处输入图片说明

and also using the command line:并且还使用命令行:

sudo xcode-select --switch /Applications/Xcode_7.3.app/Contents/Developer

*change the Xcode version to the new one you want to use *将 Xcode 版本更改为您要使用的新版本

one of the reasons could be you might deleted /private folder.原因之一可能是您可能删除了 /private 文件夹。

you can try with following commands您可以尝试使用以下命令

sudo mkdir /private/tmp 
sudo chmod 1777 /private/tmp

Following are the steps for solved above issue:以下是解决上述问题的步骤:

  1. Search launchd.conf file in your mac在你的 mac 中搜索 launchd.conf 文件

  2. If not found then create from Terminal with help of command如果未找到,则在命令的帮助下从终端创建

~ user$ sudo touch /etc/launchd.conf ~ 用户 $ sudo touch /etc/launchd.conf

  1. Terminal will ask you machine password终端会询问你机器密码

  2. Then Open created file with help of command for EDIT, if terminal give you error as permission failed然后在编辑命令的帮助下打开创建的文件,如果终端给你错误,因为权限失败

~ user$ sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /etc/launchd.conf ~ 用户 $ sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /etc/launchd.conf

  1. Open file manually from /etc/launchd.conf (Shift+cmd+g) and enter /etc/ (TextEdit software)从 /etc/launchd.conf (Shift+cmd+g) 手动打开文件并输入 /etc/ (TextEdit 软件)

  2. In file "DYLD_INSERT_LIBRARIES" flag replace with "ZZ" and save it.在文件中“DYLD_INSERT_LIBRARIES”标志替换为“ZZ”并保存。

  3. Restart your machine.重新启动您的机器。

  4. Xcode will defiantly works. Xcode 将顽强地工作。

This error indicates an error starting up launchd_sim when booting the simulated device.此错误表示在启动模拟设备时启动 launchd_sim 时出错。 In and of itself, it does not indicate the actual cause.就其本身而言,它并不表明实际原因。 You can look in ~/Library/Logs/CoreSimulator/CoreSimulator.log for more information about the error (including the error reason).您可以在 ~/Library/Logs/CoreSimulator/CoreSimulator.log 中查看有关错误的更多信息(包括错误原因)。

Possible causes:可能的原因:

  1. On OSX 10.9 and earlier, DYLD_INSERT_LIBRARIES could be set by 3rd party applications.在 OSX 10.9 及更早版本上,DYLD_INSERT_LIBRARIES 可以由 3rd 方应用程序设置。 On later versions, invalid DYLD_INSERT_LIBRARIES are ignored instead of resulting in an error.在更高版本中,无效的 DYLD_INSERT_LIBRARIES 将被忽略而不是导致错误。

  2. Usage of older simulator runtime DLC with Xcode 7 betas.将旧模拟器运行时 DLC 与 Xcode 7 beta 一起使用。 Newer versions of Xcode ignore these older DLC.较新版本的 Xcode 会忽略这些较旧的 DLC。

If you need additional help, please provide that additional datum.如果您需要额外的帮助,请提供额外的数据。

Just check your simulator's iOS version.只需检查您的模拟器的 iOS 版本。 I fought with this error for 2 days and tried everything.我与这个错误斗争了 2 天并尝试了一切。 Once I run the project on the simulator with iOS version that my Xcode supports, it worked sadly ... :/一旦我使用我的 Xcode 支持的 iOS 版本在模拟器上运行该项目,它就运行得很糟糕......:/

I quit everything and restarted the Mac.我退出了一切并重新启动了 Mac。 That's all.就这样。 Its worked like charm!!它的作用就像魅力一样!!

I don't know why, but this happened to me when I had Charles Proxy's throttling turned on.我不知道为什么,但是当我打开 Charles Proxy 的节流时,这发生在我身上。

I didn't have to run Xcode again or clean anything.我不必再次运行 Xcode 或清理任何东西。 Just disabling the throttling allowed the simulator to work again.只是禁用节流允许模拟器再次工作。

I also clicked on details, but this was all that I got:我还点击了详细信息,但这就是我得到的全部:

Details细节

Unable to boot the Simulator.无法启动模拟器。 Domain: NSPOSIXErrorDomain域:NSPOSIXErrorDomain

Code 60代码 60

Failure Reason: launchd failed to respond.失败原因:launchd 没有响应。

This might be related a known Xcode 11.2 issue :这可能与已知的Xcode 11.2 问题有关

Third party “endpoint security” software may cause slow simulators, system freezes, or prevent debug processes from running in simulators reliably.第三方“端点安全”软件可能会导致模拟器运行缓慢、系统冻结或阻止调试过程在模拟器中可靠运行。 This sometimes manifests as debugserver disconnections or simulator applications receiving a SIGKILL signal.这有时表现为调试服务器断开连接或模拟器应用程序收到 SIGKILL 信号。 (55853555) (55853555)

Workaround: Uninstall the third party software.解决方法:卸载第三方软件。

Though I was seeing this error on 11.1.虽然我在 11.1 上看到了这个错误。 Yet Apple may have just not realized this was an issue on 11.1 as well ¯_(ツ)_/¯然而苹果可能只是没有意识到这也是 11.1 的问题¯_(ツ)_/¯

I have solved this issue using following steps:我已经使用以下步骤解决了这个问题:

Xcode -> Preferences -> Location -> Derived Data -> Delete your project folder. Xcode -> Preferences -> Location -> Derived Data -> 删除你的项目文件夹。

我在 OS Catalina, Xcode 11 上遇到了这个错误。我通过简单地退出模拟器和 Xcode 解决了这个问题,然后启动 Xcode 并运行您的应用程序。

1. Quit Xcode and Simulator if running. 1. 如果 Xcode 和模拟器正在运行,请退出。

2. Remove customised settings setup 2.删除自定义设置设置

defaults delete com.apple.Xcode

3. remove configuration folders 3.删除配置文件夹

rm -rf ~/Library/Application\ Support/Xcode

4. Quit the terminal and run Xcode again. 4. 退出终端并再次运行 Xcode。

Resetting the simulators fixed the issue for me.重置模拟器为我解决了这个问题。 Run the below Fastlane command to reset all simulators,运行以下Fastlane命令重置所有模拟器,

fastlane snapshot reset_simulators

Please ensure you have closed Xcode & simulator before running the command.在运行命令之前,请确保您已关闭 Xcode 和模拟器。


Fastlane is an Android & iOS deployment automation tool. Fastlane是一款 Android & iOS 部署自动化工具。

I just simply follow the below steps and the issue is resolved...我只需按照以下步骤操作即可解决问题...

Go to About This Mac > Storage > Manage > Developer > Select Xcode cache > Delete the cache Go 至关于本机>存储>管理>开发人员> Select Xcode 缓存>删除缓存

Now try to open the simulator again and it will work... In case if above steps did not work just try to do the same with s现在尝试再次打开模拟器,它将起作用...如果上述步骤不起作用,请尝试对 s 执行相同操作

Late answer, but it maybe helpful to someone.迟到的答案,但它可能对某人有帮助。 I tried all the solutions provided in this and related posts and neither of them worked.我尝试了这篇文章和相关文章中提供的所有解决方案,但都没有奏效。

I am using OSX(version 10.10.3) and Xcode 6.2.我正在使用 OSX(版本 10.10.3)和 Xcode 6.2。 To fix this issue I followed the following steps :为了解决这个问题,我遵循了以下步骤:

  • Delete all xcode and simulator related files using AppCleaner .使用AppCleaner删除所有 xcode 和模拟器相关文件。
  • Restart Mac.重新启动 Mac。
  • Open Disk Utility app from applications.从应用程序打开磁盘工具应用程序。
  • In Disk Utility app;磁盘工具应用程序中; click on button Verify Disk Permission for your Macintosh HD ( there will be some warnings displayed; I think /private/tmp is cause of this issue ).单击按钮验证Macintosh HD 的磁盘权限会显示一些警告;我认为 /private/tmp 是导致此问题的原因)。
  • In Disk Utility app;磁盘工具应用程序中; click on button Repair Disk Permission for your Macintosh HD.单击按钮修复Macintosh HD 的磁盘权限
  • Re-install Xcode;重新安装Xcode; now it should work.现在它应该工作了。

More info : How to fix Xcode error 'Unable to boot iOS Simulator' .更多信息: 如何修复 Xcode 错误“无法启动 iOS 模拟器”

This may helpful这可能有帮助

  • Open simulator with 4s用 4s 打开模拟器
  • Click on menu- iOS simulator点击菜单-iOS模拟器
  • Click on Reset content and settings...单击重置内容和设置...
  • Force close the simulator and run app.强制关闭模拟器并运行应用程序。

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

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