百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
L

lottie-spm

> 编程语言
开源

Swift 包管理器支持 Lottie,这是一款用于原生渲染 After Effects 矢量动画的 iOS 库

200 stars0 点赞4 次浏览
访问官网GitHub

工具介绍

Swift 包管理器支持 Lottie,这是一款用于原生渲染 After Effects 矢量动画的 iOS 库

Lottie for Swift Package Manager

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:

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

and add it to your target like this:

swift
dependencies: [
  .product(name: "Lottie", package: "lottie-spm")
]

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 Version Support

Lottie supports Swift / Xcode versions back to the minimum version that is permitted by Apple for submissions to the App Store. You can see the most up-to-date information for which Swift versions Lottie supports on Swift Package Index:

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.

When generating a privacy report, Xcode will automatically detect and use the privacy manifest included in the downloaded Lottie.xcframework. For convenience we also provide a copy of the privacy manifest in this repo.

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

When using lottie-spm, the downloaded Lottie.xframework isn't visible in the project navigator. To validate the authenticity of a lottie-spm package, you can confirm that the Package.swift file references a binary XCFramework from https://github.com/airbnb/lottie-ios/releases.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Ruby

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言