airbnb /lottie-ios
An iOS library to natively render After Effects vector animations
★ 26,941⑂ 3,839👁 452⑃ 935● 1,515▤ 72
More from this author
-1
Daily
+15
Weekly
+42
Monthly
26,941
stars
3,839
forks
452
watchers
935
prs
1,515
issues
72
releases
README
Lottie for iOS
View documentation, FAQ, help, examples, and more at airbnb.io/lottie
Lottie is a cross-platform library for iOS, macOS, tvOS, visionOS, Android, and Web that natively renders vector-based animations and art in realtime with minimal code.
Lottie loads and renders animations and vectors exported in the bodymovin JSON format. Bodymovin JSON can be created and exported from After Effects with bodymovin, Sketch with Lottie Sketch Export, and from Haiku.
Designers can create and ship beautiful animations without an engineer painstakingly recreating them by hand.
Since the animations are backed by JSON, they are extremely small in size but can be large in complexity!
Animations can be played, resized, looped, sped up, slowed down, reversed, and even interactively scrubbed.
Lottie can play or loop just a portion of the animation as well, the possibilities are endless!
Animations can even be changed at runtime in various ways! Change the color, position, or any keyframable value!
Here is just a small sampling of the power of Lottie
!Example1
!Example2
!Example3
!Abcs
Installing Lottie
Lottie supports Swift Package Manager, CocoaPods, and Carthage (Both dynamic and static).
Github Repo
You can pull the Lottie Github Repo and include the Lottie.xcodeproj to build a dynamic or static library.
Swift Package Manager
To install Lottie using Swift Package Manager you can follow the tutorial published by Apple using the URL for the Lottie repo with the current version:
1. In Xcode, select “File” → “Add Packages...”
1. Enter https://github.com/airbnb/lottie-spm.git
or you can add the following dependency to your Package.swift:
swift
.package(url: "https://github.com/airbnb/lottie-spm.git", from: "4.6.1")
When using Swift Package Manager we recommend using the lottie-spm repo instead of the main lottie-ios repo. The main git repository for lottie-ios is somewhat large (300+ MB), and Swift Package Manager always downloads the full repository with all git history. The lottie-spm repo is much smaller (less than 500kb), so can be downloaded much more quickly.
Instead of downloading the full git history of Lottie and building it from source, the lottie-spm repo just contains a pointer to the precompiled XCFramework included in the latest lottie-ios release (typically ~8MB). If you prefer to include Lottie source directly your project, you can directly depend on the main lottie-ios repo by referencing https://github.com/airbnb/lottie-ios.git instead.
CocoaPods
Add the pod to your Podfile:
ruby
pod 'lottie-ios'
And then run:
ruby
pod install
After installing the cocoapod into your project import Lottie with
swift
import Lottie
Carthage
Add Lottie to your Cartfile:
github "airbnb/lottie-ios" "master"
And then run:
carthage update
In your application targets “General” tab under the “Linked Frameworks and Libraries” section, drag and drop lottie-ios.framework from the Carthage/Build/iOS directory that carthage updTop issues
#1739The Main Thread rendering engine doesn't currently support repeaters. To play an animation with repeaters, you can use the Core Animation rendering engine instead20 comments · 2022-09-05#1717Trim Paths timing is out of sync15 comments · 2022-08-12#2624CALayerInvalidGeometry with iOS 26 and Pro Max Devices12 comments · 2025-12-02#2533Shadow not getting rendered9 comments · 2025-02-07#2549Last frame of animation is missing8 comments · 2025-03-26#2527Problem with animation on moving from .mainThread to .coreAnimation5 comments · 2025-01-27#2493Animation Frame appears unexpectedly and freezes app5 comments · 2024-10-22#2578Is it necessary to change the loading of UIImage to asynchronous in order to reduce stuck?4 comments · 2025-07-04
Discussions
#2699Lottie crash while decoding Base64 image assets0 comments · 2026-09-01#2693App crashes on launch with `SIGABRT` in `dyld __abort_with_payload` on iOS 27.0 Developer Beta1 comments · 2026-06-18#2687Offload LottieAnimationView when off screen1 comments · 2026-06-08#2686Automatically falling back to Main Thread rendering engine0 comments · 2026-05-28#2671After applying the config below, the animation will quickly flash back to the first frame from the last frame when it ends.2 comments · 2026-03-30#2662Performance improvement for main-thread NodeRenderSystem1 comments · 2026-03-06#2656Xcode Cloud frequently fails to resolve package due to XCFramework download failure - xcodebuild: error: Could not resolve package dependencies1 comments · 2026-02-26#2653Support KMP - Kotlin Multiplatform0 comments · 2026-02-17
Latest release
4.6.1 4.6.1 2026-06-13What's Changed Add padding around text layer to compensate for buggy fonts by @eXCoreX in https://github.com/airbnb/lottie-ios/pull/2639 Add staticRendering mode for snapshot testing by @jqsilver in https://github.com/airbnb/lottie-ios/pull/2642 Fix animation state lost when view removed from window in SwiftUI by @kirillsh in https://github.com/airbnb/lottie-ios/pull/2646 Fix currentFrame rounding by @Med1D in https://github.com/airbnb/lottie-ios/pull/2650 Add Objective-C compatible font provider to CompatibleAnimationView. by @dzhu7 in https://github.com/airbnb/lottie-ios/pull/2657