When I am running my react native app on IOS 14 and 15 versions, it works fine. But when I run my app for IOS 12 and 13, it fails on Xcode with the following error:
dyld: Library not loaded: /usr/lib/swift/libswiftWebKit.dylib Referenced from: /Users/pravesh2/Library/Developer/CoreSimulator/Devices/3DCC37D6-C744-4D43-9D8C-D1D1241449F4/data/Containers/Bundle/Application/74376524-5AE0-48BB-8400-6766A893F5D7/RegoReactNative.app/RegoReactNative Reason: image not found dyld: launch, loading dependent libraries DYLD_SHARED_CACHE_DIR=/Users/pravesh2/Library/Developer/CoreSimulator/Caches/dyld/21A559/com.apple.CoreSimulator.SimRuntime.iOS-13-0.17A577 DYLD_ROOT_PATH=/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.0.simruntime/Contents/Resources/RuntimeRoot DYLD_LIBRARY_PATH=/Users/pravesh2/Library/Developer/Xcode/DerivedData/RegoReactNative-bsjgjlzpcbtlynfhkcijhdzedlqe/Build/Products/Debug-iphonesimulator:/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.0.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.0.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libBacktraceRecording.dylib:/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.0.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libMainThreadChecker.dylib:/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 13.0.simruntime/Contents/Resources/RuntimeRoot/Developer/Library/PrivateFrameworks/DTDDIS (lldb)
In XCode I have set the minimum deployment target as 12.0 and I am running XCode version 13.2.1 and using new build system. React Native version - 0.63.4
Any help would be appreciated. Thanks.
libSwiftWebKit
is specifically a Swift library. Not sure why your App works on newer iOS versions and fails on older versions. Unless newer iOS versions have different behaviors towards Objective-C projects (which I believe is most of the code written for React Native iOS libraries).
You can try adding an empty .swift
source file to the Xcode project and try compiling. The steps are as follows.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.