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:
- In Xcode, select “File” → “Add Packages…”
- 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.4.3")
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:
pod 'lottie-ios'
And then run:
pod install
After installing the cocoapod into your project import Lottie with
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 update
produced.
Privacy
Lottie does not collect any data. We provide this notice to help you fill out App Privacy Details. We additionally provide a privacy manifest which can be included in your app.
Security
We distribute XCFramework bundles for each release on GitHub. In Lottie 4.4.0 and later, these XCFramework bundles include a code signature. These bundles are self-signed under the name “Lottie iOS” and have the following fingerprint:
89 2F 1B 43 04 7B 50 53 8F 2F 46 EA D9 29 00 DD 3D 48 11 F358 21 78 C0 61 A5 FB 20 F1 11 CB 26
In Xcode you can verify this by selecting Lottie.xcframework
and confirming that it shows the following information: