Releases: airbnb/lottie-spm
4.3.0
Lottie 4.3.0 adds many new features, including:
- Official support for SwiftUI!
- A public Core Animation
CALayer
subclass - Support for reduced motion
- Support for drop shadow layer effects
- Support for visionOS in the lottie-ios repo
You can learn more about Lottie 4.3.0 in this announcement: Lottie 4.3.0 now available, with official support for SwiftUI #2189
New Features
- Add SwiftUI
LottieView
, which wraps UIKitLottieAnimationView
- Add SwiftUI
LottieSwitch
, which wraps UIKitAnimatedSwitch
(airbnb/lottie-ios#2138) - Add SwiftUI
LottieButton
, which wrapsAnimatedButton
(airbnb/lottie-ios#2139) AnimatedSwitch
andAnimatedButton
now support macOS (airbnb/lottie-ios#2138, airbnb/lottie-ios#2139)- Add
LottieAnimationLayer
, a Core AnimationCALayer
subclass for playing Lottie animations (airbnb/lottie-ios#2073) - Add support for rendering drop shadow layer effects (airbnb/lottie-ios#2142)
- Add API for playing multiple markers sequentially (airbnb/lottie-ios#2084)
- Play "reduced motion" marker if
UIAccessibility.isReduceMotionEnabled
is true (airbnb/lottie-ios#2110) - Update text provider API to use full
AnimationKeypath
values (airbnb/lottie-ios#2183) - Add support for visionOS to lottie-ios repo (airbnb/lottie-ios#2152)
- Drop support for Swift 5.5 (airbnb/lottie-ios#2152)
- Add contents gravity configuration to
AnimationImageProvider
(airbnb/lottie-ios#2177) - Add support for customizing stroke width values using
FloatValueProvider
(airbnb/lottie-ios#2179) - Adopt
Sendable
to support using Lottie with strict concurrency enabled (airbnb/lottie-ios#2126) - Add
LottiePlaybackMode
to support declarative playback configuration (airbnb/lottie-ios#2128) - Add option make main thread rendering engine force display update on every frame (airbnb/lottie-ios#2168)
- Add a option to prevent caching images from
AnimationImageProvider
(airbnb/lottie-ios#2171) - Add support for customizing gradient values using
GradientValueProvider
(airbnb/lottie-ios#2182) - Added additional support for multiple animations in
DotLottieFile
(airbnb/lottie-ios#2074) - Add helper method to initialize
DotLottieFile
with data (airbnb/lottie-ios#2090)
Bug fixes
- Remove
.../ZipFoundation/README.md
from targets and*.md*
files from podspec (airbnb/lottie-ios#2057)* - Fix issue where layers with negative X scale values could be pixelated (airbnb/lottie-ios#2067)
- Fix warnings when building with Swift 5.9 (airbnb/lottie-ios#2072)
- Restructure
ValueProviderStore
to not accumulate multiple values for the same key (airbnb/lottie-ios#2082) - Disable bitcode when building XCFramework (airbnb/lottie-ios#2121)
- Fix unhandled file warning when building with SPM (https://github.com/airbnb/lottie-ios/pull/213)
- Fix support for customizing color of
SolidLayer
usingColorValueProvider
(airbnb/lottie-ios#2154) - Fix issue where shape items could be unexpectedly ignored (airbnb/lottie-ios#2156)
- Fix issue where skew keyframes would unexpectedly not animate (airbnb/lottie-ios#2157)
- Fix issue where value providers could be ignored when falling back to main thread rendering engine (airbnb/lottie-ios#2164)
Thanks to everyone who contributed to this release!
4.2.0
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
What's Changed
- Added support for Opacity, Position, Scale, and Rotation value providers to Core Animation rendering engine (airbnb/lottie-ios#2047)
- Updateed minimum macOS version to 10.11 (airbnb/lottie-ios#2050)
- Fixed issue where rounded corners algorithm would return incorrect path for shapes without any rounded corners (#1964)
- Improved dotLottie error handling (airbnb/lottie-ios#1969)
- Added support for loading DotLottieFile by name and filename synchronously (airbnb/lottie-ios#1968)
- Updated ZIPFoundation to 0.9.16 to resolve
dataCorrupted
errors (airbnb/lottie-ios#1978) - Fixed issue where
**
wildcard incorrectly required matching at least one path component (airbnb/lottie-ios#1988) - Fixed issue where completion handler could be called unexpectedly when setting up animation (airbnb/lottie-ios#1994)
- Added
LottieAnimationView.allHierarchyKeypaths()
to get list of animation keypaths at runtime (airbnb/lottie-ios#2004) - Added a warning when playing animation that uses unsupported After Effects expressions (airbnb/lottie-ios#2006)
- Added
LottieAnimationView.maskAnimationToBounds
configuration option (airbnb/lottie-ios#2008) - Trim whitespaces and newlines before decoding base 64 string to image (airbnb/lottie-ios#2016)
- Added support for configuring
LottieBackgroundBehavior
to Objective-CCompatibleAnimationView
(airbnb/lottie-ios#2027) - Fixed issue where Trim could be applied to too many shape items (airbnb/lottie-ios#2041)
- Set animationLayer to nil when removing oldAnimation (airbnb/lottie-ios#2035)
- Fixed issue where Trim strokeStart / strokeEnd could be rendered in incorrect order (airbnb/lottie-ios#2049)
- Fixed issue where calling
setValueProvider
would reset animation progress (airbnb/lottie-ios#2052) - Fixed issue where trim offset could be calculated incorrectly (airbnb/lottie-ios#2053)
Full Changelog: airbnb/lottie-ios@4.1.3...4.2.0
4.1.3
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
What's Changed
- Add support for 3D rotations on X and Y axis (airbnb/lottie-ios#1930)
- Update color parsing to ignore alpha values for consistency with other platforms (airbnb/lottie-ios#1934)
- Allow subclassing
LottieAnimationView
(airbnb/lottie-ios#1937) - Expose
AnimationTextProvider
in objc wrapper (airbnb/lottie-ios#1944) - Add dispatch queue parameter to dotLottie loading methods (airbnb/lottie-ios#1956)
- Fix macOS build issues for apps using
Lottie.xcframework
/lottie-spm
(airbnb/lottie-ios#1960)
4.1.2
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: #5 (comment), airbnb/lottie-ios#1926 (comment)
4.1.0 release notes
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.
Improvements and bug fixes
- Made DotLottieAnimation attributes optional to simplify Manifest file (airbnb/lottie-ios#1844)
- Fix heap buffer overflow in CGColor+RGB extensions (airbnb/lottie-ios#1858)
- Add support for display P3 color space (airbnb/lottie-ios#1857)
- Add some missing utility to CompatibleAnimationView (airbnb/lottie-ios#1881)
- Fix issue where ShapeTransform could incorrectly affect stroke width (airbnb/lottie-ios#1872)
- Fix issue where empty trim item would take precedence over non-empty trim item (airbnb/lottie-ios#1875)
- Fix issue where some top-level shape items would be silently ignored (airbnb/lottie-ios#1874)
- Fix frame setting issue for CompatibleAnimationView (airbnb/lottie-ios#1878)
- Gradient Fill Layer: Support strokes (airbnb/lottie-ios#1818)
- Change veryLargeRect size to fix issue with masks (airbnb/lottie-ios#1884)
- Fix issue where Fill following other Fill would be silently ignored (airbnb/lottie-ios#1888)
- Fix issue where negative
scale.x
values didn't render correctly on iOS 14 (airbnb/lottie-ios#1894) - Fix issue where
LottieAnimationView.currentFrame
would be incorrect after playing animation withLottieLoopMode.playOnce
(airbnb/lottie-ios#1897) - Fix issue where shape items could be applied in incorrect order (airbnb/lottie-ios#1899)
- Fix issue where stroke and fill could be rendered in incorrect order (airbnb/lottie-ios#1903)
- Fix issue where
play(fromProgress: 1, toProgress: 0)
animation would not actually play (airbnb/lottie-ios#1908) - Add support for skew animations (airbnb/lottie-ios#1917)
4.1.1
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 (airbnb/lottie-ios#1925), which could cause apps to crash (airbnb/lottie-ios#1925).
4.1.0 release notes
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.
Improvements and bug fixes
- Made DotLottieAnimation attributes optional to simplify Manifest file (airbnb/lottie-ios#1844)
- Fix heap buffer overflow in CGColor+RGB extensions (airbnb/lottie-ios#1858)
- Add support for display P3 color space (airbnb/lottie-ios#1857)
- Add some missing utility to CompatibleAnimationView (airbnb/lottie-ios#1881)
- Fix issue where ShapeTransform could incorrectly affect stroke width (airbnb/lottie-ios#1872)
- Fix issue where empty trim item would take precedence over non-empty trim item (airbnb/lottie-ios#1875)
- Fix issue where some top-level shape items would be silently ignored (airbnb/lottie-ios#1874)
- Fix frame setting issue for CompatibleAnimationView (airbnb/lottie-ios#1878)
- Gradient Fill Layer: Support strokes (airbnb/lottie-ios#1818)
- Change veryLargeRect size to fix issue with masks (airbnb/lottie-ios#1884)
- Fix issue where Fill following other Fill would be silently ignored (airbnb/lottie-ios#1888)
- Fix issue where negative
scale.x
values didn't render correctly on iOS 14 (airbnb/lottie-ios#1894) - Fix issue where
LottieAnimationView.currentFrame
would be incorrect after playing animation withLottieLoopMode.playOnce
(airbnb/lottie-ios#1897) - Fix issue where shape items could be applied in incorrect order (airbnb/lottie-ios#1899)
- Fix issue where stroke and fill could be rendered in incorrect order (airbnb/lottie-ios#1903)
- Fix issue where
play(fromProgress: 1, toProgress: 0)
animation would not actually play (airbnb/lottie-ios#1908) - Add support for skew animations (airbnb/lottie-ios#1917)
4.1.0
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.
Improvements and bug fixes
- Made DotLottieAnimation attributes optional to simplify Manifest file (airbnb/lottie-ios#1844)
- Fix heap buffer overflow in CGColor+RGB extensions (airbnb/lottie-ios#1858)
- Add support for display P3 color space (airbnb/lottie-ios#1857)
- Add some missing utility to CompatibleAnimationView (airbnb/lottie-ios#1881)
- Fix issue where ShapeTransform could incorrectly affect stroke width (airbnb/lottie-ios#1872)
- Fix issue where empty trim item would take precedence over non-empty trim item (airbnb/lottie-ios#1875)
- Fix issue where some top-level shape items would be silently ignored (airbnb/lottie-ios#1874)
- Fix frame setting issue for CompatibleAnimationView (airbnb/lottie-ios#1878)
- Gradient Fill Layer: Support strokes (airbnb/lottie-ios#1818)
- Change veryLargeRect size to fix issue with masks (airbnb/lottie-ios#1884)
- Fix issue where Fill following other Fill would be silently ignored (airbnb/lottie-ios#1888)
- Fix issue where negative
scale.x
values didn't render correctly on iOS 14 (airbnb/lottie-ios#1894) - Fix issue where
LottieAnimationView.currentFrame
would be incorrect after playing animation withLottieLoopMode.playOnce
(airbnb/lottie-ios#1897) - Fix issue where shape items could be applied in incorrect order (airbnb/lottie-ios#1899)
- Fix issue where stroke and fill could be rendered in incorrect order (airbnb/lottie-ios#1903)
- Fix issue where
play(fromProgress: 1, toProgress: 0)
animation would not actually play (airbnb/lottie-ios#1908) - Add support for skew animations (airbnb/lottie-ios#1917)
4.0.1
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: airbnb/lottie-ios#1807 (comment)
This is also the first release available through the lottie-spm repo.
Note
There's a known issue where lottie-spm 4.0.1 only supports Swift 5.7 / Xcode 14. This will be resolved in lottie-spm 4.1.0.
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.