Library / SDK
airbnb/lottie-ios avatar
airbnb/lottie-ios

Lottie for iOS renders vector animations from Bodymovin JSON

An iOS library to natively render After Effects vector animations

26,889 stars3,838 forksSwiftApache-2.0

At a glance

What is it?
Airbnb Lottie is a cross-platform library that renders vector animations and art in realtime from Bodymovin JSON, with installs via Swift Package Manager, CocoaPods, and Carthage, and a documented privacy and code-signing posture.
Who is it for?
Lottie for iOS is a mature, cross-platform animation library that turns Bodymovin JSON exports from After Effects, Sketch, and Haiku into natively rendered vector animations with minimal code. It reaches Apple developers through Swift Package Manager, CocoaPods, and Carthage, with the project steering Swift Package Manager users toward the lightweight lottie-spm repository to avoid downloading the large main repo.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 1 day ago.
What is it written in?
Mainly Swift, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 28, 2026, and from our analysis. They are not legal advice.

DEEP OPEN-SOURCE ANALYSIS

Lottie renders vector animations from Bodymovin JSON

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. It loads and renders animations and vectors exported in the Bodymovin JSON format. That JSON can be created and exported from After Effects with bodymovin, from Sketch with the Lottie Sketch Export plugin, and from Haiku.

Because the animations are backed by JSON, they are described in the documentation as extremely small in size but able to carry large complexity. Animations can be played, resized, looped, sped up, slowed down, reversed, and interactively scrubbed, and Lottie can play or loop just a portion of an animation. Values such as color, position, or any keyframable property can also be changed at runtime, which is what lets designers ship animations without an engineer recreating them by hand.

Supported Apple platforms and distribution methods

The library targets iOS, macOS, tvOS, and visionOS on the Apple side, and it is paired with separate Android and Web projects under the same Lottie name. For Apple developers the README documents three supported dependency managers: Swift Package Manager, CocoaPods, and Carthage, with both dynamic and static options noted for Carthage.

The documentation also points to a GitHub repo workflow where a developer pulls the Lottie repository and includes the Lottie.xcodeproj to build a dynamic or static library. For most users the package managers are the simpler route, and the project recommends the smaller lottie-spm repository over the main repo when using Swift Package Manager because the main repository is large.

Installing Lottie with Swift Package Manager

When using Swift Package Manager, the README suggests either adding the package through Xcode by selecting File then Add Packages and entering the lottie-spm URL, or editing the project's Package.swift directly. The documented dependency entry points at the lottie-spm repository rather than the main lottie-ios repository:

swift
.package(url: "https://github.com/airbnb/lottie-spm.git", from: "4.6.1")

The reason given is size: the main lottie-ios git repository is somewhat large at more than 300 MB, and Swift Package Manager always downloads the full repository with all git history, while the lottie-spm repository is much smaller at less than 500 KB. Instead of building from source, lottie-spm just contains a pointer to the precompiled XCFramework included in the latest lottie-ios release, which is typically around 8 MB. Developers who want the source directly can depend on the main lottie-ios repository instead.

Installing Lottie with CocoaPods and Carthage

For CocoaPods the documented steps are to add the pod to the Podfile and then run the install command, after which the module is imported in Swift:

ruby
pod 'lottie-ios'
ruby
pod install
swift
import Lottie

Carthage follows the same shape: add the project to the Cartfile and run the update command, then drag the produced framework into the application target's Linked Frameworks and Libraries section. The README gives the Cartfile entry as the airbnb/lottie-ios repository on the master branch and the update command as carthage update, with the built framework coming from the Carthage/Build/iOS directory. All three managers therefore resolve to the same library, and the choice comes down to which tool the rest of the project already uses.

Privacy posture and signed XCFrameworks

The README states plainly that Lottie does not collect any data, and it provides that notice to help developers fill out Apple's App Privacy Details. The project also ships a privacy manifest that can be included in an app. This no-collection stance is relevant for teams filing privacy paperwork, since the library itself adds no telemetry to a shipping application.

On the security side, the project distributes XCFramework bundles for each release on GitHub. Starting with Lottie 4.4.0, those XCFramework bundles include a code signature, self-signed under the name Lottie iOS, and the README publishes the fingerprint so a developer can verify the bundle in Xcode by selecting Lottie.xcframework and confirming the signing information.

Contributing and the testing workflow

The project welcomes community contributions and describes a workspace, Lottie.xcworkspace, that includes the framework for iOS, macOS, and tvOS, unit and snapshot tests that must run on an iPhone 8 simulator, and an Example iOS app with more than 100 sample animations for browsing and testing. Pull requests that change how animations render should include snapshot test cases that validate the change.

Adding a sample animation to the snapshot suite means dropping a JSON file into Tests/Samples and re-running the snapshot tests to generate the new image files, and updating existing snapshots means setting isRecording to true in SnapshotTests.swift setUp and re-running. The Rakefile defines helper commands for building, testing, and formatting, and the project expects Swift code to follow the Airbnb Swift Style Guide, with automatic reformatting available through SwiftFormat and SwiftLint.

Editorial conclusion

Lottie for iOS is a mature, cross-platform animation library that turns Bodymovin JSON exports from After Effects, Sketch, and Haiku into natively rendered vector animations with minimal code. It reaches Apple developers through Swift Package Manager, CocoaPods, and Carthage, with the project steering Swift Package Manager users toward the lightweight lottie-spm repository to avoid downloading the large main repo. The library takes a clear privacy position of collecting no data and ships a privacy manifest, and from version 4.4.0 its XCFramework bundles carry a published code signature for verification. For contributors, a workspace with snapshot tests and an Example app, plus Rakefile driven build and format commands, rounds out a conventional open-source workflow.

Frequently asked questions

Is Lottie better than GIF?

The README frames Lottie animations as vector based and backed by JSON, which makes them extremely small in file size while still carrying large complexity, and they can be resized, looped, scrubbed, and changed at runtime. A GIF is a fixed raster file that cannot be re-colored or re-timed without re-exporting, so Lottie offers more flexibility for the same visual result at a smaller weight.

Is Lottie free to use?

Lottie is published as an open-source library and is available through CocoaPods, Swift Package Manager, and Carthage; the README displays a license badge and does not mention any paid tiers. Developers can depend on the precompiled XCFramework or build from source without a commercial license requirement shown in the documentation.

How do I add Lottie to an Xcode project?

The documentation offers two main routes: in Xcode choose File then Add Packages and enter the lottie-spm repository URL, or add a Package.swift dependency on that repository. CocoaPods users add the lottie-ios pod and run pod install, then import Lottie in Swift. Carthage users add the repo to their Cartfile and drag the built framework into the target.

Official sources

  1. airbnb/lottie-ios on GitHub
  2. License: Apache-2.0
  3. Project website
  4. README
  5. Releases
For maintainers

Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/airbnb-lottie-ios.svg)](https://hysenlabs.com/projects/airbnb-lottie-ios)
Community notes

Community notes