Unable to open liblaunch_sim.dylib

蓝咒 提交于 2019-12-19 06:05:30

问题


Today I have updated xcode. when i tried to run project on simulator(ios version < 9.0) I got this error.

"Unable to open liblaunch_sim.dylib. Try reinstalling Xcode or the simulator runtime.

It ran perfectly on ios9.0 simulator. here is screen shot. please help me.


回答1:


This will also occur when you don't have the simulator actually installed within XCode. I recently upgraded to XCode 7.1 and didn't install all simulators and received this same error.

  • Go to Preferences -> Downloads
  • Verify you have a checkmark next to the desired Simulator you are trying to run within XCode.
  • If no checkmark, then install the simulator of choice. 8.1, 8.2, 8.3, 8.4



回答2:


I don't think that there is an "officially supported" way to solve this yet, but have a look at this answer (which originates from this more detailed troubleshoot) for a potential fix.

[Edit] In you case, try running those:

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"



回答3:


First, find the target file:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/system/host/liblaunch_sim.dylib You need make backup liblaunch_sim.dylib

Second, copied to destination (Remember to backup)

/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 7.1.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/host/liblaunch_sim.dylib And If need it to: iOS 8.1.simruntime iOS 8.2.simruntime iOS 8.3.simruntime All done.

Hope it helps.




回答4:


I faced similar problem this problem occurs when we have multiple versions of Xcode Installed ... So i force quit all the xcode and simulator and then open the xcode version you want to open.



来源:https://stackoverflow.com/questions/32821827/unable-to-open-liblaunch-sim-dylib

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!