Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 668
msk Avatar asked Mar 26 '19 15:03

msk


4 Answers

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

/usr/lib/swift

as your 1st argument like this:

Image of dialog

like image 148
A H Avatar answered Nov 20 '22 01:11

A H


Make sure /usr/lib/swift is the first argument for runtime search paths for linker if iOS >= 12.2, it should load platform libraries.

like image 44
msk Avatar answered Nov 20 '22 01:11

msk


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

like image 30
CrazyJoeLv Avatar answered Nov 20 '22 00:11

CrazyJoeLv


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.

like image 4
adamup Avatar answered Nov 19 '22 23:11

adamup