An iOS library to natively render After Effects vector animations
APACHE-2.0 License
Bot releases are hidden (Show)
LottieView
helper for configuring individual LottieAnimationView
properties (https://github.com/airbnb/lottie-ios/pull/2415)Lottie now requires Xcode 15 / Swift 5.9 or later (https://github.com/airbnb/lottie-ios/pull/2400). Our version support policy is that Lottie supports Swift / Xcode versions back to the minimum version that is permitted by Apple for submissions to the App Store. As of April 2024, this is Xcode 15 / Swift 5.9: https://developer.apple.com/news/?id=fxu2qp7b.
Full Changelog: https://github.com/airbnb/lottie-ios/compare/4.4.3...4.5.0
Published by calda 6 months ago
Full Changelog: https://github.com/airbnb/lottie-ios/compare/4.4.2...4.4.3
Published by calda 7 months ago
State(initialValue:)
in LottieView
(https://github.com/airbnb/lottie-ios/pull/2357)Full Changelog: https://github.com/airbnb/lottie-ios/compare/4.4.1...4.4.2
Published by calda 8 months ago
LottieAnimationView.viewportFrame
(https://github.com/airbnb/lottie-ios/pull/2316)Full Changelog: https://github.com/airbnb/lottie-ios/compare/4.4.0...4.4.1
Published by calda 9 months ago
overlay
instead of ZStack
(https://github.com/airbnb/lottie-ios/pull/2289)DotLottieImageProvider
instance if there's no image files (https://github.com/airbnb/lottie-ios/pull/2271)Full Changelog: https://github.com/airbnb/lottie-ios/compare/4.3.4...4.4.0
Published by calda 11 months ago
SwiftUI
and Combine
to weak
to ensure compatibility with iOS 12 by @florianrhein in https://github.com/airbnb/lottie-ios/pull/2219
UIScreen.main
to get display scale on iOS 13.0 and later (#2215) by @hyun99999 in https://github.com/airbnb/lottie-ios/pull/2216
Full Changelog: https://github.com/airbnb/lottie-ios/compare/4.3.3...4.3.4
Published by calda about 1 year ago
Lottie 4.3.0 adds many new features, including:
CALayer
subclassYou can learn more about Lottie 4.3.0 in this announcement: Lottie 4.3.0 now available, with official support for SwiftUI #2189
Lottie 4.3.3 fixes a regression introduced by Lottie 4.3.0 where the contents of a LottieAnimationView
could crossfade / animate unexpectedly when updating the current LottieAnimation
or rendering engine: https://github.com/airbnb/lottie-ios/issues/2200
LottieView
, which wraps UIKit LottieAnimationView
LottieSwitch
, which wraps UIKit AnimatedSwitch
(https://github.com/airbnb/lottie-ios/pull/2138)LottieButton
, which wraps AnimatedButton
(https://github.com/airbnb/lottie-ios/pull/2139)AnimatedSwitch
and AnimatedButton
now support macOS (https://github.com/airbnb/lottie-ios/pull/2138, https://github.com/airbnb/lottie-ios/pull/2139)LottieAnimationLayer
, a Core Animation CALayer
subclass for playing Lottie animations (https://github.com/airbnb/lottie-ios/pull/2073)UIAccessibility.isReduceMotionEnabled
is true (https://github.com/airbnb/lottie-ios/pull/2110)AnimationKeypath
values (https://github.com/airbnb/lottie-ios/pull/2183)AnimationImageProvider
(https://github.com/airbnb/lottie-ios/pull/2177)FloatValueProvider
(https://github.com/airbnb/lottie-ios/pull/2179)Sendable
to support using Lottie with strict concurrency enabled (https://github.com/airbnb/lottie-ios/pull/2126)LottiePlaybackMode
to support declarative playback configuration (https://github.com/airbnb/lottie-ios/pull/2128)AnimationImageProvider
(https://github.com/airbnb/lottie-ios/pull/2171)GradientValueProvider
(https://github.com/airbnb/lottie-ios/pull/2182)DotLottieFile
(https://github.com/airbnb/lottie-ios/pull/2074)DotLottieFile
with data (https://github.com/airbnb/lottie-ios/pull/2090).../ZipFoundation/README.md
from targets and *.md*
files from podspec (https://github.com/airbnb/lottie-ios/pull/2057)*ValueProviderStore
to not accumulate multiple values for the same key (https://github.com/airbnb/lottie-ios/pull/2082)SolidLayer
using ColorValueProvider
(https://github.com/airbnb/lottie-ios/pull/2154)Thanks to everyone who contributed to this release!
Published by calda about 1 year ago
Lottie 4.3.0 adds many new features, including:
CALayer
subclassYou can learn more about Lottie 4.3.0 in this announcement: Lottie 4.3.0 now available, with official support for SwiftUI #2189
Lottie 4.3.2 redesigns the LottiePlaybackMode
playback APIs that were introduced in Lottie 4.3.0.
// Loop from 0.5 to 1.0
LottieView(animation: myAnimation)
.play(.fromProgress(0.5, toProgress: 1.0, loopMode: .loop))
// Pause at the halfway point of the animation
LottieView(animation: myAnimation)
.play(.progress(0.5))
// Loop from 0.5 to 1.0
LottieView(animation: myAnimation)
.playing(.fromProgress(0.5, toProgress: 1.0, loopMode: .loop))
// Pause at the halfway point of the animation
LottieView(animation: myAnimation)
.paused(at: .progress(0.5))
LottieView
, which wraps UIKit LottieAnimationView
LottieSwitch
, which wraps UIKit AnimatedSwitch
(https://github.com/airbnb/lottie-ios/pull/2138)LottieButton
, which wraps AnimatedButton
(https://github.com/airbnb/lottie-ios/pull/2139)AnimatedSwitch
and AnimatedButton
now support macOS (https://github.com/airbnb/lottie-ios/pull/2138, https://github.com/airbnb/lottie-ios/pull/2139)LottieAnimationLayer
, a Core Animation CALayer
subclass for playing Lottie animations (https://github.com/airbnb/lottie-ios/pull/2073)UIAccessibility.isReduceMotionEnabled
is true (https://github.com/airbnb/lottie-ios/pull/2110)AnimationKeypath
values (https://github.com/airbnb/lottie-ios/pull/2183)AnimationImageProvider
(https://github.com/airbnb/lottie-ios/pull/2177)FloatValueProvider
(https://github.com/airbnb/lottie-ios/pull/2179)Sendable
to support using Lottie with strict concurrency enabled (https://github.com/airbnb/lottie-ios/pull/2126)LottiePlaybackMode
to support declarative playback configuration (https://github.com/airbnb/lottie-ios/pull/2128)AnimationImageProvider
(https://github.com/airbnb/lottie-ios/pull/2171)GradientValueProvider
(https://github.com/airbnb/lottie-ios/pull/2182)DotLottieFile
(https://github.com/airbnb/lottie-ios/pull/2074)DotLottieFile
with data (https://github.com/airbnb/lottie-ios/pull/2090).../ZipFoundation/README.md
from targets and *.md*
files from podspec (https://github.com/airbnb/lottie-ios/pull/2057)*ValueProviderStore
to not accumulate multiple values for the same key (https://github.com/airbnb/lottie-ios/pull/2082)SolidLayer
using ColorValueProvider
(https://github.com/airbnb/lottie-ios/pull/2154)Thanks to everyone who contributed to this release!
Published by calda about 1 year ago
Lottie 4.3.0 adds many new features, including:
CALayer
subclassYou can learn more about Lottie 4.3.0 in this announcement: Lottie 4.3.0 now available, with official support for SwiftUI #2189
Lottie 4.3.1 fixes a small regression introduced by 4.3.0: https://github.com/airbnb/lottie-ios/issues/2193
LottieView
, which wraps UIKit LottieAnimationView
LottieSwitch
, which wraps UIKit AnimatedSwitch
(https://github.com/airbnb/lottie-ios/pull/2138)LottieButton
, which wraps AnimatedButton
(https://github.com/airbnb/lottie-ios/pull/2139)AnimatedSwitch
and AnimatedButton
now support macOS (https://github.com/airbnb/lottie-ios/pull/2138, https://github.com/airbnb/lottie-ios/pull/2139)LottieAnimationLayer
, a Core Animation CALayer
subclass for playing Lottie animations (https://github.com/airbnb/lottie-ios/pull/2073)UIAccessibility.isReduceMotionEnabled
is true (https://github.com/airbnb/lottie-ios/pull/2110)AnimationKeypath
values (https://github.com/airbnb/lottie-ios/pull/2183)AnimationImageProvider
(https://github.com/airbnb/lottie-ios/pull/2177)FloatValueProvider
(https://github.com/airbnb/lottie-ios/pull/2179)Sendable
to support using Lottie with strict concurrency enabled (https://github.com/airbnb/lottie-ios/pull/2126)LottiePlaybackMode
to support declarative playback configuration (https://github.com/airbnb/lottie-ios/pull/2128)AnimationImageProvider
(https://github.com/airbnb/lottie-ios/pull/2171)GradientValueProvider
(https://github.com/airbnb/lottie-ios/pull/2182)DotLottieFile
(https://github.com/airbnb/lottie-ios/pull/2074)DotLottieFile
with data (https://github.com/airbnb/lottie-ios/pull/2090).../ZipFoundation/README.md
from targets and *.md*
files from podspec (https://github.com/airbnb/lottie-ios/pull/2057)*ValueProviderStore
to not accumulate multiple values for the same key (https://github.com/airbnb/lottie-ios/pull/2082)SolidLayer
using ColorValueProvider
(https://github.com/airbnb/lottie-ios/pull/2154)Thanks to everyone who contributed to this release!
Published by calda about 1 year ago
Lottie 4.3.0 adds many new features, including:
CALayer
subclassYou can learn more about Lottie 4.3.0 in this announcement: Lottie 4.3.0 now available, with official support for SwiftUI #2189
LottieView
, which wraps UIKit LottieAnimationView
LottieSwitch
, which wraps UIKit AnimatedSwitch
(https://github.com/airbnb/lottie-ios/pull/2138)LottieButton
, which wraps AnimatedButton
(https://github.com/airbnb/lottie-ios/pull/2139)AnimatedSwitch
and AnimatedButton
now support macOS (https://github.com/airbnb/lottie-ios/pull/2138, https://github.com/airbnb/lottie-ios/pull/2139)LottieAnimationLayer
, a Core Animation CALayer
subclass for playing Lottie animations (https://github.com/airbnb/lottie-ios/pull/2073)UIAccessibility.isReduceMotionEnabled
is true (https://github.com/airbnb/lottie-ios/pull/2110)AnimationKeypath
values (https://github.com/airbnb/lottie-ios/pull/2183)AnimationImageProvider
(https://github.com/airbnb/lottie-ios/pull/2177)FloatValueProvider
(https://github.com/airbnb/lottie-ios/pull/2179)Sendable
to support using Lottie with strict concurrency enabled (https://github.com/airbnb/lottie-ios/pull/2126)LottiePlaybackMode
to support declarative playback configuration (https://github.com/airbnb/lottie-ios/pull/2128)AnimationImageProvider
(https://github.com/airbnb/lottie-ios/pull/2171)GradientValueProvider
(https://github.com/airbnb/lottie-ios/pull/2182)DotLottieFile
(https://github.com/airbnb/lottie-ios/pull/2074)DotLottieFile
with data (https://github.com/airbnb/lottie-ios/pull/2090).../ZipFoundation/README.md
from targets and *.md*
files from podspec (https://github.com/airbnb/lottie-ios/pull/2057)*ValueProviderStore
to not accumulate multiple values for the same key (https://github.com/airbnb/lottie-ios/pull/2082)SolidLayer
using ColorValueProvider
(https://github.com/airbnb/lottie-ios/pull/2154)Thanks to everyone who contributed to this release!
Published by calda over 1 year ago
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
dataCorrupted
errors (https://github.com/airbnb/lottie-ios/pull/1978)**
wildcard incorrectly required matching at least one path component (https://github.com/airbnb/lottie-ios/pull/1988)LottieAnimationView.allHierarchyKeypaths()
to get list of animation keypaths at runtime (https://github.com/airbnb/lottie-ios/pull/2004)LottieAnimationView.maskAnimationToBounds
configuration option (https://github.com/airbnb/lottie-ios/pull/2008)LottieBackgroundBehavior
to Objective-C CompatibleAnimationView
(https://github.com/airbnb/lottie-ios/pull/2027)setValueProvider
would reset animation progress (https://github.com/airbnb/lottie-ios/pull/2052)Full Changelog: https://github.com/airbnb/lottie-ios/compare/4.1.3...4.2.0
Published by calda over 1 year ago
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)Published by calda over 1 year ago
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)Published by calda over 1 year ago
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)Published by calda over 1 year ago
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)Published by calda almost 2 years ago
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
Published by calda almost 2 years ago
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
Published by calda about 2 years ago
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.
Published by calda about 2 years ago
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)Published by calda about 2 years ago
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)