Releases: airbnb/lottie-ios
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 (#2047)
- Updated minimum macOS version to 10.11 (#2050)
- Fixed issue where rounded corners algorithm would return incorrect path for shapes without any rounded corners (#1964)
- Improved dotLottie error handling (#1969)
- Added support for loading DotLottieFile by name and filename synchronously (#1968)
- Updated ZIPFoundation to 0.9.16 to resolve
dataCorrupted
errors (#1978) - Fixed issue where
**
wildcard incorrectly required matching at least one path component (#1988) - Fixed issue where completion handler could be called unexpectedly when setting up animation (#1994)
- Added
LottieAnimationView.allHierarchyKeypaths()
to get list of animation keypaths at runtime (#2004) - Added a warning when playing animation that uses unsupported After Effects expressions (#2006)
- Added
LottieAnimationView.maskAnimationToBounds
configuration option (#2008) - Trim whitespaces and newlines before decoding base 64 string to image (#2016)
- Added support for configuring
LottieBackgroundBehavior
to Objective-CCompatibleAnimationView
(#2027) - Fixed issue where Trim could be applied to too many shape items (#2041)
- Set animationLayer to nil when removing oldAnimation (#2035)
- Fixed issue where Trim strokeStart / strokeEnd could be rendered in incorrect order (#2049)
- Fixed issue where calling
setValueProvider
would reset animation progress (#2052) - Fixed issue where trim offset could be calculated incorrectly (#2053)
Full Changelog: 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 (#1930)
- Update color parsing to ignore alpha values for consistency with other platforms (#1934)
- Allow subclassing
LottieAnimationView
(#1937) - Expose
AnimationTextProvider
in objc wrapper (#1944) - Add dispatch queue parameter to dotLottie loading methods (#1956)
- Fix macOS build issues for apps using
Lottie.xcframework
/lottie-spm
(#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: airbnb/lottie-spm#5 (comment), #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 (#1844)
- Fix heap buffer overflow in CGColor+RGB extensions (#1858)
- Add support for display P3 color space (#1857)
- Add some missing utility to CompatibleAnimationView (#1881)
- Fix issue where ShapeTransform could incorrectly affect stroke width (#1872)
- Fix issue where empty trim item would take precedence over non-empty trim item (#1875)
- Fix issue where some top-level shape items would be silently ignored (#1874)
- Fix frame setting issue for CompatibleAnimationView (#1878)
- Gradient Fill Layer: Support strokes (#1818)
- Change veryLargeRect size to fix issue with masks (#1884)
- Fix issue where Fill following other Fill would be silently ignored (#1888)
- Fix issue where negative
scale.x
values didn't render correctly on iOS 14 (#1894) - Fix issue where
LottieAnimationView.currentFrame
would be incorrect after playing animation withLottieLoopMode.playOnce
(#1897) - Fix issue where shape items could be applied in incorrect order (#1899)
- Fix issue where stroke and fill could be rendered in incorrect order (#1903)
- Fix issue where
play(fromProgress: 1, toProgress: 0)
animation would not actually play (#1908) - Add support for skew animations (#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 (#1925), which could cause apps to crash (#1926).
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 (#1844)
- Fix heap buffer overflow in CGColor+RGB extensions (#1858)
- Add support for display P3 color space (#1857)
- Add some missing utility to CompatibleAnimationView (#1881)
- Fix issue where ShapeTransform could incorrectly affect stroke width (#1872)
- Fix issue where empty trim item would take precedence over non-empty trim item (#1875)
- Fix issue where some top-level shape items would be silently ignored (#1874)
- Fix frame setting issue for CompatibleAnimationView (#1878)
- Gradient Fill Layer: Support strokes (#1818)
- Change veryLargeRect size to fix issue with masks (#1884)
- Fix issue where Fill following other Fill would be silently ignored (#1888)
- Fix issue where negative
scale.x
values didn't render correctly on iOS 14 (#1894) - Fix issue where
LottieAnimationView.currentFrame
would be incorrect after playing animation withLottieLoopMode.playOnce
(#1897) - Fix issue where shape items could be applied in incorrect order (#1899)
- Fix issue where stroke and fill could be rendered in incorrect order (#1903)
- Fix issue where
play(fromProgress: 1, toProgress: 0)
animation would not actually play (#1908) - Add support for skew animations (#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 (#1844)
- Fix heap buffer overflow in CGColor+RGB extensions (#1858)
- Add support for display P3 color space (#1857)
- Add some missing utility to CompatibleAnimationView (#1881)
- Fix issue where ShapeTransform could incorrectly affect stroke width (#1872)
- Fix issue where empty trim item would take precedence over non-empty trim item (#1875)
- Fix issue where some top-level shape items would be silently ignored (#1874)
- Fix frame setting issue for CompatibleAnimationView (#1878)
- Gradient Fill Layer: Support strokes (#1818)
- Change veryLargeRect size to fix issue with masks (#1884)
- Fix issue where Fill following other Fill would be silently ignored (#1888)
- Fix issue where negative
scale.x
values didn't render correctly on iOS 14 (#1894) - Fix issue where
LottieAnimationView.currentFrame
would be incorrect after playing animation withLottieLoopMode.playOnce
(#1897) - Fix issue where shape items could be applied in incorrect order (#1899)
- Fix issue where stroke and fill could be rendered in incorrect order (#1903)
- Fix issue where
play(fromProgress: 1, toProgress: 0)
animation would not actually play (#1908) - Add support for skew animations (#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: #1807 (comment)
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.
XCFramework checksum: b6d8b0b81975d91965b8bb00cffb0eae4b3d94538b6950a90bc1366afd5d4239
4.0.0
Learn more about this release: Announcing Lottie 4.0 for iOS on the Airbnb Tech Blog
Major changes
-
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.
Full changelog
- Use
RenderingEngineOption.automatic
by default by @calda in #1764 - Fix issue where inverted mask layer was clipped incorrectly by @calda in #1763
- Bump to 4.0.0, remove backwards compatibility typealiases by @calda in #1768
- Update
LottieBackgroundBehavior.default
from.pause
to.pauseAndRestore
for Main Thread rendering engine by @calda in #1770 - Adds ability to not play the frame of the end marker (#1758) by @lennartstolz in #1772
- Change LottieAnimationHelpers default animation cache to LRUAnimationCache.shared (#1773) by @pejato in #1778
- Update LottieConfiguration to use DecodingStrategy.dictionaryBased by default by @marcelofabri in #1777
- Allow customizing default AnimationCacheProvider by @marcelofabri in #1779
- Replace LRUAnimationCache with a thread-safe NSCache-based cache by @marcelofabri in #1783
- Update minimum Swift version to 5.5 by @calda in #1787
- Adds .lottie file load capability to LottieAnimation by @eharrison in #1785
- Add Rounded Corners by @johnny-duo in #1795
- Add rounded corner support to Core Animation rendering engine by @calda in #1796
- Add support for animating
startPoint
andendPoint
of radial gradients by @calda in #1798 - Update Core Animation rendering engine to use device RGB color space by @calda in #1801
- added mask to bounds flag by @BugorBN in #1814
- Add completion callbacks to LottieAnimationView DotLottie initializers by @calda in #1810
3.5.0
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: #1627
Lottie 3.5.0
This version renames several public types, to resolve conflicts with types in Apple frameworks (#1420):
Lottie.Animation
has been renamed toLottieAnimation
, to resolve a conflict withSwiftUI.Animation
Lottie.Color
has been renamed toLottieColor
, to resolve a conflict withSwiftUI.Color
Lottie.Vector3D
has been renamed toLottieVector3D
, to resolve a conflict withSpatial.Vector3D
For consistency with these new names, we have also renamed the following public types:
Lottie.AnimationView
has been renamed toLottieAnimationView
Lottie.Vector1D
has been renamed toLottieVector1D
Lottie.Vector2D
has been renamed toLottieVector2D
.
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.
Lottie 4.0
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.
Known issues
If your application has a storyboard that references AnimationView
, it may crash when using Lottie 3.5.0 (#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.
3.4.4
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: #1627
What's Changed
- Updated Main Thread rendering engine to use
warn
(print
) instead ofassertionFailure
when detecting unsupported usage of repeaters (#1754) - Fixed issue where manually-interpolated shape animations would ignore time remapping (#1757)
- Added marker duration support (#1749)
- Updated
animationDidSet
to beopen
(#1746) - Updated
AnimatedSwitch
andAnimatedButton
to allow overrides of begin/end tracking in subclasses (#1747) - Added
animateUpdateWhenChangingAnimation
flag toAnimatedControl
(#1750)
3.4.3
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: #1627
New Features
- Updated Core Animation rendering engine to support
TextProvider
s (#1723) - Updated Core Animation rendering engine to support time stretch in pre-comp layers (#1726)
- Updated
Animation.loadedFrom
method to support using a customURLSession
(#1733)
Bug fixes
- Fixed performance issue with line dash patterns (#1736)
- Fixed race condition in Core Animation rendering engine's
playbackState
property (#1727) - Fixed issue where Core Animation rendering engine would ignore
hidden
flag on some shape items (#1728) - Fixed issue where Core Animation rendering engine would ignore
CAGradientLayer
locations / color stops (#1734) - Fixed issue where Core Animation rendering engine would not render alpha gradient (#1737)