lottie-ios
lottie-ios copied to clipboard
Storyboard referencing `AnimationView` causes crash in Lottie 3.5.0
Which Version of Lottie are you using?
Lottie 3.5.0
The following crashes are showing up in 3.5.0 after updating from 3.4.4:

Reverting back to 3.4.4, these crashes go away.
Could you share a sample project that reproduces this issue? Also more details about the crash (a stack trace and the error message) would be helpful.
Currently not able to repro this with a brand new project, I'll take another stab at it once I get some free cycles again.
If you can share more info about the crash (especially the error message and stack trace) we may be able to add a defensive fix even without a repro case
Bad Access:
The stack trace isn't that helpful so I've left it out. We're using a combination of Storyboard and UIKit here in some legacy code to render this animation. This issue might go away if we rewrote it using SwiftUI. Nonetheless its a crash that's new to 3.5.0.
I will work on getting more info from my development team but I can second the new crashes we are seeing after upgrading to 3.5.0.
The same issue, after updating to version 3.5.0
Same issue here! Seems to be caused by:
a) having AnimationView
referenced a storyboard
b) using LottieAnimation.named(:
to initialise an AnimationView's animation, or initialising an LottieAnimationView's animation view Animation.named(:
We've updated all references to either AnimationView or Animation.named across the whole project to their newer counterparts and it seems to have resolved all crashes for now if it helps!

Ohhh, interesting! It sounds like changing AnimationView
from a class to a typealias is source-compatible for existing Swift code but not for existing storyboards. Thanks for the info.
I don't think there's a fix for this on our side -- storyboards will just need to he updated to use LottieAnimationView
instead of AnimationView
. We're removing the old AnimationView
declaration completely in Lottie 4.0 this month, which will hopefully change this cryptic error into something easier to understand (e.g. "no type named AnimationView").
I'll keep this issue open until we release Lottie 4.0, for visibility.
Ohhh, interesting! It sounds like changing
AnimationView
from a class to a typealias is source-compatible for existing Swift code but not for existing storyboards. Thanks for the info.I don't think there's a fix for this on our side -- storyboards will just need to he updated to use
LottieAnimationView
instead ofAnimationView
. We're removing the oldAnimationView
declaration completely in Lottie 4.0 this month, which will hopefully change this cryptic error into something easier to understand (e.g. "no type named AnimationView").
I can confirm changing the element in our Storyboard from AnimationView to LottieAnimationView is no longer crashing for 3.5.0
We removed the AnimationView
typealias in Lottie 4.0 (that type was renamed to LottieAnimationView
in Lottie 3.5.0), so I assume this specific issue no longer happens. Thanks all for the report.