Error ” dyld: Library not loaded: /usr/lib/swift/libswiftCoreGraphics.dylib” is seen when you are working on XCode version 14 and your application unexpectedly crashes when you are working on XCode.
Given below is the snippet of the error “dyld: Library not loaded: /usr/lib/swift/libswiftCoreGraphics.dylib” :
dyld: Library not loaded: /usr/lib/swift/libswiftCoreGraphics.dylib
The problem, “dyld: Library not loaded: /usr/lib/swift/libswiftCoreGraphics.dylib” is seen because there is probably a compatibility issue between XCode 14 and previous iOS versions. It has received several GitHub problems reports.
Visit the Apple Developer Forum and read this post, here.
The issue was that your app would have expected libswiftCoreGraphics.dylib to be located at /usr/lib/swift/libswiftCoreGraphics.dylib on the phone without the linker flag. The absence of the dylib on earlier iOS versions results in errors.
To fix error “dyld: Library not loaded: /usr/lib/swift/libswiftCoreGraphics.dylib”, add libSwiftCoreGraphics.tbd to the Frameworks, Libraries, and Embeded Contents sections of your project.
If this does not work its most likely a linker flag issue and it will be solved by adding linker flag to your project. According to Apple’s suggestion in, the linker flags should include -Wl,-weak-lswiftCoreGraphics.
Steps to Fix the problem “dyld: Library not loaded: /usr/lib/swift/libswiftCoreGraphics.dylib”:
To fix the problem you will have to add libSwiftCoreGraphics.tbd to the Frameworks, Libraries, and Embeded Contents sections of your project.
Also look at the author’s updates if you use pods or SPM. SnapKit, for instance, recently updated their podfile a few days ago. Look at the image below as a reference:

If the above solution does not work its most likely a linker flag issue and it will be solved by adding linker flag to your project.
By include the flag, the linker is instructed to regard this library as a weak linker. Instead of using the hard-coded /usr/lib/swift path at start (or load) time, the dylib will be searched relative to the @rpath.
According to Apple’s suggestion in, the linker flags should include -Wl,-weak-lswiftCoreGraphics.
This should help you fix and understand the problem, “dyld: Library not loaded: /usr/lib/swift/libswiftCoreGraphics.dylib”.
Conclusion
You must include libSwiftCoreGraphics.tbd in the Frameworks, Libraries, and Embeded Contents sections of your project in order to resolve the error.
If this doesn’t work, there’s probably a linker flag problem, which may be fixed by include linker flag in your code. Apple recommended in that the linker options contain -Wl,-weak-lswiftCoreGraphics.