This copy of libswiftCore.dylib requires an OS version prior to 12.2.0

余生长醉 提交于 2019-12-04 20:46:37

问题


The app crashes on launch when running from XCode 10.2 (before and after Swift 5.0 migration) with this on console

This copy of libswiftCore.dylib requires an OS version prior to 12.2.0.

I understand the error, but not sure what is required to fix this.


回答1:


Someone in my team fixed the issue. It is a fix in BUCK

providing /usr/lib/swift as a first argument for runtime search paths to linker if iOS >= 12.2, it should load platform libraries.




回答2:


Got it fixed in our ObjectiveC-only project by adding empty Swift file. Don't remove it, just keep it there forever!




回答3:


For anybody not using BUCK but still experiencing this issue, try adding /usr/lib/swift in your target's Runtime Search Paths (under Build Settings). Instantly fixed things up for me.




回答4:


Go to BuildSettings -> Linking -> runpath search path and add

/usr/lib/swift

as your 1st argument like this:




回答5:


This worked for me:

  1. Go to "Window" tab -> "Devices and Simulators"
  2. Switch to "Simulators" tab
  3. Click on "+" in bottom left corner
  4. Select "iPhone X" (or whatever device you see in console error) in "Device Type" select
  5. Click "Create"



回答6:


Check that the version of iOS Deployment Target in Build Settings are installed correctly, especially when you use app extensions (todayextension, shareextension) all versions must be the same.



来源:https://stackoverflow.com/questions/55361057/this-copy-of-libswiftcore-dylib-requires-an-os-version-prior-to-12-2-0

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