An iOS library to natively render After Effects vector animations
Note Starting in Lottie 4.0, the Core Animation rendering engine is now enabled by default. Learn more about this change: Announcing Lottie 4.0 for iOS on the Airbnb Tech Blog
LottieAnimationView
(https://github.com/airbnb/lottie-ios/pull/1937)AnimationTextProvider
in objc wrapper (https://github.com/airbnb/lottie-ios/pull/1944)Lottie.xcframework
/ lottie-spm
(https://github.com/airbnb/lottie-ios/pull/1960)Note Starting in Lottie 4.0, the Core Animation rendering engine is now enabled by default. Learn more about this change: Announcing Lottie 4.0 for iOS on the Airbnb Tech Blog
4.1.2 fixes an issue where the lottie-spm package would fail to build in some environments: https://github.com/airbnb/lottie-spm/pull/5#issuecomment-1398991609, https://github.com/airbnb/lottie-ios/issues/1926#issuecomment-1398866563
We've added a new way to integrate Lottie into your project using Swift Package Manager. We now provide a separate lottie-spm repo that is much smaller than the main lottie-ios repo (~500kb instead of ~300mb). Learn more about this change here.
scale.x
values didn't render correctly on iOS 14 (https://github.com/airbnb/lottie-ios/pull/1894)LottieAnimationView.currentFrame
would be incorrect after playing animation with LottieLoopMode.playOnce
(https://github.com/airbnb/lottie-ios/pull/1897)play(fromProgress: 1, toProgress: 0)
animation would not actually play (https://github.com/airbnb/lottie-ios/pull/1908)Note Starting in Lottie 4.0, the Core Animation rendering engine is now enabled by default. Learn more about this change: Announcing Lottie 4.0 for iOS on the Airbnb Tech Blog
4.1.1 fixes an issue where the lottie-spm package could not be embedded into iOS app builds (#1925), which could cause apps to crash (#1926).
We've added a new way to integrate Lottie into your project using Swift Package Manager. We now provide a separate lottie-spm repo that is much smaller than the main lottie-ios repo (~500kb instead of ~300mb). Learn more about this change here.
scale.x
values didn't render correctly on iOS 14 (https://github.com/airbnb/lottie-ios/pull/1894)LottieAnimationView.currentFrame
would be incorrect after playing animation with LottieLoopMode.playOnce
(https://github.com/airbnb/lottie-ios/pull/1897)play(fromProgress: 1, toProgress: 0)
animation would not actually play (https://github.com/airbnb/lottie-ios/pull/1908)Note Starting in Lottie 4.0, the Core Animation rendering engine is now enabled by default. Learn more about this change: Announcing Lottie 4.0 for iOS on the Airbnb Tech Blog
We've added a new way to integrate Lottie into your project using Swift Package Manager. We now provide a separate lottie-spm repo that is much smaller than the main lottie-ios repo (~500kb instead of ~300mb). Learn more about this change here.
scale.x
values didn't render correctly on iOS 14 (https://github.com/airbnb/lottie-ios/pull/1894)LottieAnimationView.currentFrame
would be incorrect after playing animation with LottieLoopMode.playOnce
(https://github.com/airbnb/lottie-ios/pull/1897)play(fromProgress: 1, toProgress: 0)
animation would not actually play (https://github.com/airbnb/lottie-ios/pull/1908)4.0.1 fixes an issue in 4.0.0 where the install could fail due to issues with Git LFS: #1830, #1834.
We now publish xframework
binaries as a part of our release process: https://github.com/airbnb/lottie-ios/discussions/1807#discussioncomment-4346438
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.
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.RenderingEngineOption.automatic
, please file an issue with a copy of your animation json.DecodingStrategy.dictionaryBased
is now enabled by default
Codable
decoding implementationBackwards compatibility typealiases for Animation
, AnimationView
, Color
, Vector1D
, Vector2D
, and Vector3D
, which were introduced in Lottie 3.5.0, have been removed to resolve conflicts with types in Apple frameworks. These types are now named LottieAnimation
, LottieAnimationView
, LottieColor
, LottieVector1D
, LottieVector2D
, and LottieVector3D
.
The default LottieBackgroundBehavior
used by LottieAnimationView
is now .pauseAndRestore
instead of pause
.
Lottie for iOS now supports the dotLottie file format.
The library's minimum-supported Swift version is now Swift 5.5.
XCFramework checksum: b6d8b0b81975d91965b8bb00cffb0eae4b3d94538b6950a90bc1366afd5d4239
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.
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.RenderingEngineOption.automatic
, please file an issue with a copy of your animation json.DecodingStrategy.dictionaryBased
is now enabled by default
Codable
decoding implementationBackwards compatibility typealiases for Animation
, AnimationView
, Color
, Vector1D
, Vector2D
, and Vector3D
, which were introduced in Lottie 3.5.0, have been removed to resolve conflicts with types in Apple frameworks. These types are now named LottieAnimation
, LottieAnimationView
, LottieColor
, LottieVector1D
, LottieVector2D
, and LottieVector3D
.
The default LottieBackgroundBehavior
used by LottieAnimationView
is now .pauseAndRestore
instead of pause
.
Lottie for iOS now supports the dotLottie file format.
The library's minimum-supported Swift version is now Swift 5.5.
RenderingEngineOption.automatic
by default by @calda in https://github.com/airbnb/lottie-ios/pull/1764
LottieBackgroundBehavior.default
from .pause
to .pauseAndRestore
for Main Thread rendering engine by @calda in https://github.com/airbnb/lottie-ios/pull/1770
startPoint
and endPoint
of radial gradients by @calda in https://github.com/airbnb/lottie-ios/pull/1798
Note: Lottie 3.4.0 added a new rendering engine powered by Core Animation. Please try it out and let us know if you encounter any issues! It will be enabled by default in Lottie 4.0, which we plan on releasing later this month. More information is available in this announcement: https://github.com/airbnb/lottie-ios/discussions/1627
This version renames several public types, to resolve conflicts with types in Apple frameworks (https://github.com/airbnb/lottie-ios/issues/1420):
Lottie.Animation
has been renamed to LottieAnimation
, to resolve a conflict with SwiftUI.Animation
Lottie.Color
has been renamed to LottieColor
, to resolve a conflict with SwiftUI.Color
Lottie.Vector3D
has been renamed to LottieVector3D
, to resolve a conflict with Spatial.Vector3D
For consistency with these new names, we have also renamed the following public types:
Lottie.AnimationView
has been renamed to LottieAnimationView
Lottie.Vector1D
has been renamed to LottieVector1D
Lottie.Vector2D
has been renamed to LottieVector2D
.For backwards compatibility Lottie 3.5.0 includes typealias
es for the old names, which map to the new names. These typealias
es are marked as deprecated and include fix-its to update call-sites to the new name.
We plan on releasing Lottie 4.0 in the next few weeks. In Lottie 4.0 we will remove the compatibility typealiases (for Animation
, AnimationView
, Color
, etc) , so code using the old names will no longer compile. This will resolve the naming conflicts with SwiftUI types. Consider updating to Lottie 3.5.0 first, applying the fix-its recommended by the deprecation warnings, and then update to Lottie 4.0 once it is released (Lottie 4.0 will no longer include deprecation warnings with fix-its). Thank you for bearing with us through this transition process!
Lottie 4.0 will also make the new Core Animation rendering engine (added in Lottie 3.4.0) the default rendering engine option. As mentioned above, please try out the new rendering engine if you haven't yet and let us know if you encounter any issues! We've been hard at work fixing issues reported by the community.
If your application has a storyboard that references AnimationView
, it may crash when using Lottie 3.5.0 (https://github.com/airbnb/lottie-ios/issues/1771). The fix for this issue is to update all references of AnimationView
to LottieAnimationView
and update all references of Animation
to LottieAnimation
. This should be resolved in Lottie 4.0, where code using the old names will no longer compile.
Note: Lottie 3.4.0 added a new rendering engine powered by Core Animation. Please try it out and let us know if you encounter any issues! It will be enabled by default in Lottie 4.0, which we plan on releasing later this month. More information is available in this announcement: https://github.com/airbnb/lottie-ios/discussions/1627
warn
(print
) instead of assertionFailure
when detecting unsupported usage of repeaters (https://github.com/airbnb/lottie-ios/pull/1754)animationDidSet
to be open
(https://github.com/airbnb/lottie-ios/pull/1746)AnimatedSwitch
and AnimatedButton
to allow overrides of begin/end tracking in subclasses (https://github.com/airbnb/lottie-ios/pull/1747)animateUpdateWhenChangingAnimation
flag to AnimatedControl
(https://github.com/airbnb/lottie-ios/pull/1750)Note: Lottie 3.4.0 added a new rendering engine powered by Core Animation. Please try it out and let us know if you encounter any issues! It will be enabled by default in a future version of Lottie. More information is available in this announcement: https://github.com/airbnb/lottie-ios/discussions/1627
TextProvider
s (https://github.com/airbnb/lottie-ios/pull/1723)Animation.loadedFrom
method to support using a custom URLSession
(https://github.com/airbnb/lottie-ios/pull/1733)playbackState
property (https://github.com/airbnb/lottie-ios/pull/1727)hidden
flag on some shape items (https://github.com/airbnb/lottie-ios/pull/1728)CAGradientLayer
locations / color stops (https://github.com/airbnb/lottie-ios/pull/1734)Note: Lottie 3.4.0 added a new rendering engine powered by Core Animation. Please try it out and let us know if you encounter any issues! It will be enabled by default in a future version of Lottie. More information is available in this announcement: https://github.com/airbnb/lottie-ios/discussions/1627
fillMode
support to GradientFill
shape items (https://github.com/airbnb/lottie-ios/pull/1702).swift-version
file (https://github.com/airbnb/lottie-ios/pull/1674)assertionFailure
to warn
(https://github.com/airbnb/lottie-ios/pull/1680)isAnimationPlaying
would be incorrect when using LottieLoopMode.playOnce
(https://github.com/airbnb/lottie-ios/pull/1682)InvertedMatteLayer
s wouldn't animate when using Main Thread rendering engine (https://github.com/airbnb/lottie-ios/pull/1684)LayerModel.hidden
and ShapeItem.hidden
flags (https://github.com/airbnb/lottie-ios/pull/1689)MaskMode.none
(https://github.com/airbnb/lottie-ios/pull/1693)RenderingEngineOption.automatic
now falls back to the Main Thread rendering engine when attempting to apply Trim
to Fill
(unsupported by Core Animation rendering engine) (https://github.com/airbnb/lottie-ios/pull/1706)AnimationView.play(fromFrame:toFrame:)
with fromFrame: nil
(https://github.com/airbnb/lottie-ios/pull/1707)AnimationKeypath
s were not applied correctly by Core Animation rendering engine (https://github.com/airbnb/lottie-ios/pull/1715)GradientFill
/ GradientStroke
would be cut off when using Core Animation rendering engine (https://github.com/airbnb/lottie-ios/pull/1721)