4.0.1 fixes an issue in 4.0.0 where the install could fail due to issues with Git LFS: #1830, #1834.
Major changes in Lottie 4.0
Learn more about this release: Announcing Lottie 4.0 for iOS on the Airbnb Tech Blog
-
The new Core Animation rendering engine (first introduced in Lottie 3.4.0) is now enabled by default for supported animations.
- Specifically,
LottieConfiguration.shared.renderingEngine
now defaults to.automatic
instead of.mainThread
. Animations that use features which are not supported by the Core Animation rendering engine will automatically fall back to using the original Main Thread rendering engine. - When using the Core Animation rendering engine, Lottie animations now always animate smoothly regardless of the amount of work being done on the app’s main thread. This significantly improves animation performance while also eliminating CPU overhead.
- If you encounter any compatibility issues when using
RenderingEngineOption.automatic
, please file an issue with a copy of your animation json.
- Specifically,
-
DecodingStrategy.dictionaryBased
is now enabled by default- The new dictionary-based decoding implementation is 2x faster than the previous
Codable
decoding implementation - If you encounter any compatibility issues with this new decoding implementation, please file an issue with a copy of your animation json.
- The new dictionary-based decoding implementation is 2x faster than the previous
-
Backwards compatibility typealiases for
Animation
,AnimationView
,Color
,Vector1D
,Vector2D
, andVector3D
, which were introduced in Lottie 3.5.0, have been removed to resolve conflicts with types in Apple frameworks. These types are now namedLottieAnimation
,LottieAnimationView
,LottieColor
,LottieVector1D
,LottieVector2D
, andLottieVector3D
. -
The default
LottieBackgroundBehavior
used byLottieAnimationView
is now.pauseAndRestore
instead ofpause
. -
Lottie for iOS now supports the dotLottie file format.
-
The library's minimum-supported Swift version is now Swift 5.5.