Swift Package Manager support for Lottie, an iOS library to natively render After Effects vector animations

What's New



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

Lottie for Swift Package Manager

SwiftPM License Platform Swift Versions

This repo provides Swift Package Manager support for lottie-ios.

Installing Lottie

To install Lottie using Swift Package Manager you can follow the tutorial published by Apple using the URL for this repo with the current version:

  1. In Xcode, select “File” → “Add Packages...”
  2. Enter https://github.com/airbnb/lottie-spm.git

or you can add the following dependency to your Package.swift:

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

Why is there a separate repo for Swift Package Manager support?

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. This 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, this 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 lottie-ios repo instead.

Other Package Managers

Lottie is also available via Cocoapods, Carthage, and npm. You can also build Lottie directly from source, or manually integrate precompiled XCFrameworks into your project. More information is available in the main lottie-ios repo.


  • Swift Tools 5.5.0
View More Packages from this Author


  • None
Last updated: Sun Feb 05 2023 01:48:41 GMT-0500 (GMT-05:00)