2015-09-28 82 views
8

今天我已经更新了xcode。当我试图在模拟器上运行项目(ios版本< 9.0)时,我得到了这个错误。无法打开liblaunch_sim.dylib

“无法打开liblaunch_sim.dylib。请尝试重新安装的Xcode或模拟器运行时。

它完美地运行在ios9.0模拟器。 这里是截图。请帮助我。enter image description here enter image description here

回答

2

我不认为有一个“官方支持”的方式来解决这个问题,但看看this answer(源自this more detailed troubleshoot)潜在的修复。

[编辑]在你的情况下,尝试运行这些:

sudo cp "/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 8.1.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/host/liblaunch_sim.‌​dylib"{,.bak} 

sudo ln -sf "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/D‌​eveloper/SDKs/iPhoneSimulator.sdk/usr/lib/system/host/liblaunch_sim.dylib" "/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 8.1.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/host/liblaunch_sim.‌​dylib" 
+0

感谢您的回复!我试过这个,但不工作 –

+0

命令是否输出任何类型的错误?你有什么版本的Xcode?你用什么模拟器版本号尝试命令? –

+0

我试过用iphone5s(ios 8.0) –

11

当你没有模拟器实际的XCode内安装这样做也会发生。我最近升级到XCode 7.1,并没有安装所有的模拟器,并收到了相同的错误。

  • 转到首选项 - >下载
  • 确认你有旁打勾所需的模拟器你想的XCode中运行。
  • 如果没有复选标记,则安装选择的模拟器。 8.1,8.2,8.3,8.4
+0

让我检查这个。感谢 –

+1

雅。但7.1模拟器的选项在哪里?我无法看到7.1 –

+1

我不认为在XCode 7.1及更高版本中有7.1模拟器选项。我现在只看到iOS 8.0以上的模拟器。 –

1

首先,找到目标文件:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr /lib/system/host/liblaunch_sim.dylib 你需要做备份liblaunch_sim.dylib

其次,复制到目的地(记得备份)

/库/开发商/ CoreSimulator /概况/运行时/ iOS版7.1。 simruntime /内容/资源/ RuntimeRoot/usr/lib目录/系统/主机/ liblaunch_sim.dyli b 如果需要它:iOS 8.1.simruntime iOS 8.2.simruntime iOS 8.3.simruntime全部完成。

希望它有帮助。

0

我面临类似的问题,当我们有多个版本的Xcode安装时出现这个问题...所以我强制退出所有的Xcode和模拟器,然后打开你想打开的Xcode版本。