我在OS X Mavericks 10.9.5上的Xcode 6.0.1中出错。
当我调试时,iOS 8模拟器显示以下错误:
无法启动iOS模拟器。
几秒钟后,Xcode显示另一个错误:
运行时遇到错误(Domain = DTiPhoneSimulatorErrorDomain,Code = 2)
然而,iOS 7模拟器工作!!
答案 0 :(得分:1)
您是否设置了DYLD_INSERT_LIBRARIES?检查/etc/launchd.conf并在〜/ Library / Logs / DiagnosticReports中查找launchd_sim崩溃日志......如果是这样,这是一个骗局
答案 1 :(得分:0)
此时,与XCode 5相比,XCode 6中的模拟器似乎存在很多问题。在各种部署目标和模拟器设备之间切换时,我特别看到了问题。重新启动模拟器通常可以解决问题,如果没有,请尝试重新启动XCode。
答案 2 :(得分:0)
我也遇到了这个问题,并通过以下步骤找到了解决方案: -
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.
After that ->
2) Downloaded and installed the iOS 7.1 Simulator under the path Xcode --> Preferences --> Downloads.
Restart xcode again and the problem solved.
3) I am facing same issue again next morning.
Unsetting the DYLD_INSERT_LIBRARIES variable solves my problem:-
a) Open terminal and type "sudo vi /etc/launchd.conf" command and press Enter
b) Press I "Insert" mode and change this
"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.
c) Save changes by typing ":wq" Press Enter
d) Reboot your system and problem soloved.
Prior to that i didn't found 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 devices.
>
希望这有助于任何人。
答案 3 :(得分:0)
感谢小伙子,但我终于找到了解决方案。 对于那些仍在寻找解决方案的人来说,这是帮助我的人:
Yoseph不会使用文件/etc/launchd.conf。我刚刚删除了它。您也可以在该文件中取消设置DYLD_INSERT_LIBRARIES环境变量。希望这能帮到你们所有人。
答案 4 :(得分:-1)
确保您拥有路径" Xcode - >偏好 - >地点 - >命令行工具 - >选择Xcode 6.0,如果没有选择那个。另一个选项是在iOS模拟器下执行"重置内容和设置"。希望这有帮助!