lottie-react-native: Could not find or use auto-linked library 'swiftWebKit'
Description
Error raised when building the app.
Steps to Reproduce
- run build in the xcode app.
- error when building
Expected behavior: build the app without such error.
Actual behavior:
ld: warning: Could not find or use auto-linked library 'swiftWebKit'
Undefined symbols for architecture arm64:
"__swift_FORCE_LOAD_$_swiftWebKit", referenced from:
__swift_FORCE_LOAD_$_swiftWebKit_$_lottie_react_native in liblottie-react-native.a(ContainerView.o)
__swift_FORCE_LOAD_$_swiftWebKit_$_lottie_react_native in liblottie-react-native.a(AnimationViewManagerModule.o)
(maybe you meant: __swift_FORCE_LOAD_$_swiftWebKit_$_lottie_react_native)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 11
- Comments: 26 (4 by maintainers)
I already had a
File.swiftin my project. I upgraded from 0.66 to 0.67 and got the error mentioned by the thread author.My solution was to delete the following path from the
LIBRARY_SEARCH_PATHSsetting as you can see with React Native Upgrade Helper:Go into Xcode and delete the following line:
https://github.com/facebookarchive/react-native-fbsdk/issues/755
creating
File.swiftis not working in xcode 13.Just open your project/ios with xcode, then add a new swift file and that’s it!! your problem is solved. at least it worked for me
Exactly the same after upgrading to RN 0.64
Also add
"$(SDKROOT)/usr/lib/swift\"toLIBRARY_SEARCH_PATHScan help if you want to removeFile.swiftoh, you mean the bridging header on the main project, not on the lib. Ok, I will update the documentation accordingly. Thanks!
this worked for me https://developer.apple.com/forums/thread/655438
@kockok , make sure to create File.swift + bridging header on the correct level https://teabreak.e-spres-oh.com/swift-in-react-native-the-ultimate-guide-part-1-modules-9bb8d054db03 **
**
The following is your project structure:
your-react-native-project |- ios |- android
the content the ios folder is an xcode project
you must to open this folder with the xcode and then add a new file swift file
@emilioicai it might be easier to describe the steps to take when you upgrade to RN 0.64. There are other 3rd parties libs out there that documented exactly these steps. A great how-to can be found -> https://teabreak.e-spres-oh.com/swift-in-react-native-the-ultimate-guide-part-1-modules-9bb8d054db03 You would only have to take the steps till the prompted where you choose to configure Objective-C Bridging Header.
Hope that helps.
Oh god, such a legend. Thank you.
see this: https://developer.apple.com/forums/thread/655438
Works for me, but needed to remove the trailing "".