Using lottie-ios
in framework that is imported in app which also depends on lottie-ios
crashes on setValueProvider
#2504
Antonio210696
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello! Our company produces an SDK that is then shipped inside customers' applications. We show some UI that uses Lottie. Up to now, we used to have
lottie-ios
imported as a Swift package with version 3.5.0. We ship the SDK as a framework binary via Cocoapod. A customer of ours also has a dependency to Lottie (via Cocoapods) and they are using version 3.0.0. They reported us a strange crash that happens in a portion of their code which does not even call our SDK. They simply setup an animation and usesetValueProvider
to change the color of the animation, like this:setupAnimationView
is then called atviewDidLoad
inside theViewController
.We managed to reproduce the crash, below are the screenshots of the stack trace. Another important thing is that at launch in the console, both we and the integrator see these warnings about classes being implemented in two places.
duplicated-symbols.txt
We have tried updating our Lottie version and the Lottie version of the integrator. After many attempts, the only solution that works is to switch in our SDK from using
lottie-ios
to usinglottie-spm
, which is the precompiled version. This makes the warnings above disappear and the integrator app works as expected.It seems that having duplicated symbols is an issue for Lottie, but I don't understand why, as there are other libraries which spawn those warning and non is creating issues right now.
Using
lottie-spm
is an improvement for us, so it was ok to switch, but we would like to have a better understanding of the root cause of this crash. If anyone could give us any clue, that would be much appreciated.Thank you in advance 🙏
Which Version of Lottie are you using?
Lottie 3.5.0 and above from
lottie-ios
Expected Behavior
The app should run normally, playing the animation with the correct color
https://github.com/user-attachments/assets/52d3954a-8572-4801-a5ee-d56efe93717b
Actual Behavior
The app crashes as soon as
LottieAnimationView.setValueProvider
is called.Animation JSON
Beta Was this translation helpful? Give feedback.
All reactions