lottie-react-native: 'Lottie/Lottie.h' file not found on release builds
Dear,
I added lottie-react-native into my project, linked everything and added the framework in build phases. It works well when debugging the project, but when I try to create an archive, it crashes and says 'Lottie/Lottie.h' file not found in LRNAnimationViewManager.
I’m using “lottie-react-native”: “^2.2.0” according to package.json. How do I fix this issue? This is what my build phases looks like: http://prntscr.com/gb97op
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 31 (2 by maintainers)
@dejakob Go to
General > Embedded Binaries > add Lottie.frameworkStill a problem when releasing the app. I had to add
LottieLibraryIOSto Build Phases > Target DependenciesAnd i do NOT add
Lottie.frameworkto General > Embedded Binaries or General > Linked Frameworks and Librariestry
Where is Lottie.framework located? Can’t seem to find it. I installed with pods.
@felixaa , I think you will want to initially install it using yarn, i.e:
yarn add lottie-react-native@2.2.7Then in your podfile you can add the following:
@sinhpn92 @halaszbalazs not sure if you have already solved this issue yet, I may have an answer for you, the point is:
I am using Lottie in two react-native projects. One using 0.59.10 and integrated my own BLE native module written by Swift5 for supporting IoT devices which is completely no problem during installation(I integrated a dummy swift file in case to make Swift support); another one stack at version 0.55.3 and not having any Swift things, this one cost me 2 days to integrate Lottie and I had no see any works solution during stockoverflow or github or somewhere yet.
I think the main reason is caused by not built-in correct Swift support in older version react-native, so when people using
lottie-ios> 3.0.0(which is written by Swift), the error shows.so if someone using
lottie-ios@2.5.3and the error goes, maybe @emilioicai should update the readme file to mention about this.@benjarwar thanks for the heads up. I’m reopening this issue as it looks like more people are seeing it. The ideal solution would be having
react-native linkworking.Just to tack onto what @daywong1119 said, I actually already had Lottie.framework in my embedded binaries but I had just upgraded my version of Lottie, so I had to remove the existing version of Lottie.framework and then re-add it.
@dejakob I modified my header search path as below and it achieved fine.
@sinhpn92 you have to make sure that you first add the the
Lottie.xcodeprojfromnode_modules/lottie-ios/Lottie.xcodeprojto your Libraries in Xcode. Then make sure that the two fileslibLottie.aandlibLottieReactNative.aare under “Linked Frameworks and Libraries”. After that you can click on the plus in “Embedded Binaries” and it should show up underLottie.xcode.proj>Lottie.frameworkIOS.The automatic link steps didn’t work for me so I had to do the above. Good Luck!
thanks bro RN 0.59.5
If you are using pods, remove it from your library and link libraries (make sure it’s not there) and make sure it’s in your target in the Podfile then pod install and rebuild.
Had problems with manually linking on iOS.
Working solution: Add Lottie.xcodeproj & LottieReactNative.xcodeproj to lib/frameworks folder in Xcode Add Lottie.xcodeproj > Products > Lottie.framework & LottieReactNative.xcodeproj > Products > libLottieReactNative.a to your targets
Linked Frameworks and LibrariesVoila!
@padupuy Thanks buddy, you da man!
I followed @padupuy and also had the embedded binaries. However, it keeps failing apples build processor after upload to itunes connect.
@padupuy That worked perfectly for me. Thanks heaps!