CINXE.COM
lottie-ios on CocoaPods.org
<!DOCTYPE html><html lang="en-en"><head><title>lottie-ios on CocoaPods.org</title><meta charset="utf-8" /><meta content="cocoapods objective-c objc swift package manager libraries documentation search pods podspec podfile cocoa apple ios library" name="keywords" /><meta content="IE=edge" http-equiv="X-UA-Compatible" /><meta content="width=device-width, initial-scale=1.0" name="viewport" /><meta content="A library to render native animations from bodymovin json" name="description" /><meta content="Brandon Withrow and Cal Stephens" name="author" /><meta content="summary_large_image" name="twitter:card" /><meta content="@CocoaPods" name="twitter:site" /><meta content="@CocoaPods" name="twitter:creator" /><meta content="lottie-ios" name="twitter:title" /><meta content="A library to render native animations from bodymovin json" name="twitter:description" /><meta content="https://cocoapods.org/pods/lottie-ios" name="twitter:url" /><meta content="http://cocoadocs.org/docsets/lottie-ios/4.5.1/preview.png" name="twitter:image:src" /><meta content="CocoaPods" property="og:site_name" /><meta content="lottie-ios" property="og:title" /><meta content="https://cocoapods.org/pods/lottie-ios" property="og:url" /><meta content="website" property="og:type" /><meta content="A library to render native animations from bodymovin json" property="og:description" /><meta content="http://cocoadocs.org/docsets/lottie-ios/4.5.1/preview.png" property="og:image" /><link rel="shortcut icon" href="https://cocoapods.org/favicons/favicon.ico" type="image/x-icon" /><link rel="apple-touch-icon" href="https://cocoapods.org/favicons/apple-touch-icon.png" /><link rel="apple-touch-icon" sizes="57x57" href="https://cocoapods.org/favicons/apple-touch-icon-57x57.png" /><link rel="apple-touch-icon" sizes="60x60" href="https://cocoapods.org/favicons/apple-touch-icon-60x60.png" /><link rel="apple-touch-icon" sizes="72x72" href="https://cocoapods.org/favicons/apple-touch-icon-72x72.png" /><link rel="apple-touch-icon" sizes="76x76" href="https://cocoapods.org/favicons/apple-touch-icon-76x76.png" /><link rel="apple-touch-icon" sizes="114x114" href="https://cocoapods.org/favicons/apple-touch-icon-114x114.png" /><link rel="apple-touch-icon" sizes="120x120" href="https://cocoapods.org/favicons/apple-touch-icon-120x120.png" /><link rel="apple-touch-icon" sizes="144x144" href="https://cocoapods.org/favicons/apple-touch-icon-144x144.png" /><link rel="apple-touch-icon" sizes="152x152" href="https://cocoapods.org/favicons/apple-touch-icon-152x152.png" /><script src="/javascripts/application-56f73c9d83f1a73826cc5e615f0dc55d.js"></script><link href="/stylesheets/app-56f73c9d83f1a73826cc5e615f0dc55d.css" media="screen" rel="stylesheet" type="text/css" /><link href="https://cocoapods.org/opensearch.xml" rel="search" title="CocoaPods" type="application/opensearchdescription+xml" /></head><body><nav class="navbar navbar-static-top" role="navigation"><section class="container"><div class="navbar-header"><button class="navbar-toggle" data-target=".navbar-header-collapse" data-toggle="collapse" type="button"><span class="sr-only">Toggle navigation</span><span class="glyphicon glyphicon-plus"></span></button><a class="navbar-brand" href="https://cocoapods.org"></a></div><div class="collapse navbar-collapse navbar-header-collapse"><ul class="nav navbar-nav navbar-right"><li><a href="https://cocoapods.org/about">About</a></li><li><a href="https://guides.cocoapods.org">Guides</a></li><li><a href="https://blog.cocoapods.org">Blog</a></li></ul></div></section></nav><section class="container"><article class="row" id="headline"><div class="col-lg-12 col-sm-12 col-xs-12"><h1>lottie-ios <span>4.5.1</span></h1></div></article></section><div id="content-wrapper"><section class="container" id="pod-page"><article class="row"><div class="pod_result"><div class="pod-metadata clearfix"></div><div class="sideline col-sm-3 col-xs-12 col-sm-push-9"><h1 class="visible-xs inline-headline"><a href='/pods/lottie-ios'>lottie-ios</a> <span>4.5.1</span></h1><div class="close-expanded"><a href="#">×</a></div><h3></h3><table class='header'><tbody><tr><td> <span class='hidden-lg-span'>Tests</span><span class='visible-lg-span'>Tested</span> </td><td>✗</td></tr><tr><td> <span class='hidden-lg-span'>Lang</span><span class='visible-lg-span'>Language</span> </td><td> <span class='hidden-lg-span'>Obj-C</span><span class='visible-lg-span'>Objective C</span> </td></tr><tr><td>License</td><td> <a href='https://api.github.com/licenses/apache-2.0'>Apache-2.0</a> </td></tr><tr><td> <span class='hidden-lg-span'>Released</span><span class='visible-lg-span'>Last Release</span> </td><td>Jan 2025</td></tr></tbody></table><p>Maintained by <a href='/owners/18633'>Brandon Withrow</a>, <a href='/owners/45470'>Jessica Pham</a>, <a href='/owners/35364'>Brandon</a>, <a href='/owners/41341'>Tyler Hedrick</a>, <a href='/owners/27310'>Cal Stephens</a>.</p><hr /><button class="btn" data-target="#installation_guide" data-toggle="modal" type="button">Installation Guide</button><div aria-hidden="true" aria-labelledby="installation_label" class="modal fade" id="installation_guide" role="dialog" tabindex="-1"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button aria-label="Close" class="close" data-dismiss="modal" type="button"><span aria-hidden="true">×</span></button><h4 class="modal-title" id="installation_label">Installation Guide for lottie-ios</h4></div><div class="modal-body"><p>You want to add <code>pod 'lottie-ios', '~> 4.5'</code> similar to the following to your Podfile:</p><pre><code>target 'MyApp' do pod 'lottie-ios', '~> 4.5' end</code></pre><p>Then run a <code>pod install</code> inside your terminal, or from CocoaPods.app.</p><hr /><p>Alternatively to give it a test run, run the command:</p><p><code>pod try lottie-ios</code></p></div></div></div></div><hr /><ul class="links"><li><a href="https://github.com/CocoaPods/Specs/blob/master/Specs/7/1/d/lottie-ios/4.5.1/lottie-ios.podspec.json">See Podspec</a></li><li><a href="https://github.com/airbnb/lottie-ios">GitHub Repo</a></li><li><a href="https://cocoapods.org/pods/lottie-ios">Page on CocoaPods.org</a></li></ul></div><div class="readme-content col-sm-9 col-xs-12 col-sm-pull-3"><div class="inline-headline"><h1 class="hidden-xs"><a href='/pods/lottie-ios'>lottie-ios</a> <span>4.5.1</span></h1></div><ul class="attribution"><li>By</li><li>Brandon Withrow and Cal Stephens</li></ul><nav><ul><li class="github-link"><a class="hidden-xs" href="https://github.com/airbnb/lottie-ios">airbnb/lottie-ios</a><a class="visible-xs" href="https://github.com/airbnb/lottie-ios">GitHub Repo</a></li></ul></nav><div class="clearfix"></div><div class="tab-content"><div class="tab-pane active" id="readme"><div id="readme" class="md" data-path="README.md"><article class="markdown-body entry-content container-lg" itemprop="text"><h1 dir="auto"><a id="user-content-lottie-for-ios" class="anchor" aria-hidden="true" href="#lottie-for-ios"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a>Lottie for iOS</h1> <p dir="auto"><a href="https://cocoapods.org/pods/lottie-ios" rel="nofollow"><img src="https://camo.githubusercontent.com/c204beddc4bf4949ac3bc9505fd62ae0e8c42ded880024cfea6ea12acadccb59/68747470733a2f2f696d672e736869656c64732e696f2f636f636f61706f64732f762f6c6f747469652d696f732e7376673f7374796c653d666c6174" alt="Version" data-canonical-src="https://img.shields.io/cocoapods/v/lottie-ios.svg?style=flat" style="max-width: 100%;"></a> <a href="https://github.com/Carthage/Carthage"><img src="https://camo.githubusercontent.com/c8961b92aa4c1cece705532f044860ab81846426578305a5e8d83c0f357de8c2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f43617274686167652d636f6d70617469626c652d3442433531442e7376673f7374796c653d666c6174" alt="Carthage Compatible" data-canonical-src="https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat" style="max-width: 100%;"></a> <a href="https://swift.org/package-manager/" rel="nofollow"><img src="https://camo.githubusercontent.com/db4e680db88f755692b027d972041b38481bb65f92659e5484c41373d82b94a0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53504d2d737570706f727465642d4445354334332e7376673f7374796c653d666c6174" alt="SwiftPM" data-canonical-src="https://img.shields.io/badge/SPM-supported-DE5C43.svg?style=flat" style="max-width: 100%;"></a> <a href="https://cocoapods.org/pods/lottie-ios" rel="nofollow"><img src="https://camo.githubusercontent.com/4aa3fc64070eca51d2dbc485de6721fa554f9d7676e7a4466bb2b0a6fb31bb23/68747470733a2f2f696d672e736869656c64732e696f2f636f636f61706f64732f6c2f6c6f747469652d696f732e7376673f7374796c653d666c6174" alt="License" data-canonical-src="https://img.shields.io/cocoapods/l/lottie-ios.svg?style=flat" style="max-width: 100%;"></a> <a href="https://swiftpackageindex.com/airbnb/lottie-ios" rel="nofollow"><img src="https://camo.githubusercontent.com/a5101e6ae45c4eb53fe38f7b2c5fcb9945ecb40396fcda9e807166cabd546646/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f75726c3d687474707325334125324625324673776966747061636b616765696e6465782e636f6d2532466170692532467061636b61676573253246616972626e622532466c6f747469652d696f73253246626164676525334674797065253344706c6174666f726d73" alt="Platform" data-canonical-src="https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fairbnb%2Flottie-ios%2Fbadge%3Ftype%3Dplatforms" style="max-width: 100%;"></a> <a href="https://swiftpackageindex.com/airbnb/lottie-ios" rel="nofollow"><img src="https://camo.githubusercontent.com/02fa783e6d5d6bbec2a6ca4f368963795656bb1881fbe25e3ac70f4695d76fe0/68747470733a2f2f696d672e736869656c64732e696f2f656e64706f696e743f75726c3d687474707325334125324625324673776966747061636b616765696e6465782e636f6d2532466170692532467061636b61676573253246616972626e622532466c6f747469652d696f7325324662616467652533467479706525334473776966742d76657273696f6e73" alt="Swift Versions" data-canonical-src="https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fairbnb%2Flottie-ios%2Fbadge%3Ftype%3Dswift-versions" style="max-width: 100%;"></a></p> <p dir="auto"><strong>View documentation, FAQ, help, examples, and more at <a href="https://airbnb.io/lottie/" rel="nofollow">airbnb.io/lottie</a></strong></p> <p dir="auto">Lottie is a cross-platform library for iOS, macOS, tvOS, <a href="https://github.com/airbnb/lottie-android">Android</a>, and <a href="https://github.com/airbnb/lottie-web">Web</a> that natively renders vector-based animations and art in realtime with minimal code.</p> <p dir="auto">Lottie loads and renders animations and vectors exported in the bodymovin JSON format. Bodymovin JSON can be created and exported from After Effects with <a href="https://github.com/bodymovin/bodymovin">bodymovin</a>, Sketch with <a href="https://github.com/buba447/Lottie-Sketch-Export">Lottie Sketch Export</a>, and from <a href="https://www.haiku.ai" rel="nofollow">Haiku</a>.</p> <p dir="auto">Designers can create <strong>and ship</strong> 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 <em><strong>changed at runtime</strong></em> in various ways! Change the color, position, or any keyframable value!</p> <p dir="auto">Here is just a small sampling of the power of Lottie</p> <p dir="auto"><a target="_blank" rel="noopener noreferrer" href="_Gifs/Examples1.gif"><img src="_Gifs/Examples1.gif" alt="Example1" data-animated-image="" style="max-width: 100%;"></a> <a target="_blank" rel="noopener noreferrer" href="_Gifs/Examples2.gif"><img src="_Gifs/Examples2.gif" alt="Example2" data-animated-image="" style="max-width: 100%;"></a></p> <p dir="auto"><a target="_blank" rel="noopener noreferrer" href="_Gifs/Community 2_3.gif"><img src="_Gifs/Community 2_3.gif" data-animated-image="" style="max-width: 100%;"></a></p> <p dir="auto"><a target="_blank" rel="noopener noreferrer" href="_Gifs/Examples3.gif"><img src="_Gifs/Examples3.gif" alt="Example3" data-animated-image="" style="max-width: 100%;"></a></p> <p dir="auto"><a target="_blank" rel="noopener noreferrer" href="_Gifs/Examples4.gif"><img src="_Gifs/Examples4.gif" alt="Abcs" data-animated-image="" style="max-width: 100%;"></a></p> <h2 dir="auto"><a id="user-content-installing-lottie" class="anchor" aria-hidden="true" href="#installing-lottie"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a>Installing Lottie</h2> <p dir="auto">Lottie supports <a href="https://www.swift.org/package-manager/" rel="nofollow">Swift Package Manager</a>, <a href="https://cocoapods.org/" rel="nofollow">CocoaPods</a>, and <a href="https://github.com/Carthage/Carthage">Carthage</a> (Both dynamic and static).</p> <h3 dir="auto"><a id="user-content-github-repo" class="anchor" aria-hidden="true" href="#github-repo"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a>Github Repo</h3> <p dir="auto">You can pull the <a href="https://github.com/airbnb/lottie-ios/">Lottie Github Repo</a> and include the <code>Lottie.xcodeproj</code> to build a dynamic or static library.</p> <h3 dir="auto"><a id="user-content-swift-package-manager" class="anchor" aria-hidden="true" href="#swift-package-manager"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a>Swift Package Manager</h3> <p dir="auto">To install Lottie using <a href="https://github.com/apple/swift-package-manager">Swift Package Manager</a> you can follow the <a href="https://developer.apple.com/documentation/xcode/adding_package_dependencies_to_your_app" rel="nofollow">tutorial published by Apple</a> using the URL for the Lottie repo with the current version:</p> <ol dir="auto"> <li>In Xcode, select “File” → “Add Packages...”</li> <li>Enter <a href="https://github.com/airbnb/lottie-spm.git">https://github.com/airbnb/lottie-spm.git</a></li> </ol> <p dir="auto">or you can add the following dependency to your <code>Package.swift</code>:</p> <div class="highlight highlight-source-swift notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content=".package(url: "https://github.com/airbnb/lottie-spm.git", from: "4.2.0")"><pre>.<span class="pl-c1">package</span>(<span class="pl-c1">url</span>: <span class="pl-s"><span class="pl-pds">"</span>https://github.com/airbnb/lottie-spm.git<span class="pl-pds">"</span></span>, <span class="pl-c1">from</span>: <span class="pl-s"><span class="pl-pds">"</span>4.2.0<span class="pl-pds">"</span></span>)</pre></div> <p dir="auto">When using Swift Package Manager we recommend using the <a href="https://github.com/airbnb/lottie-spm">lottie-spm</a> repo instead of the main lottie-ios repo. The main git repository for <a href="https://github.com/airbnb/lottie-ios">lottie-ios</a> is somewhat large (300+ MB), and Swift Package Manager always downloads the full repository with all git history. The <a href="https://github.com/airbnb/lottie-spm">lottie-spm</a> repo is much smaller (less than 500kb), so can be downloaded much more quickly.</p> <p dir="auto">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 <a href="https://github.com/airbnb/lottie-ios/releases/latest">latest lottie-ios release</a> (typically ~8MB). If you prefer to include Lottie source directly your project, you can directly depend on the main lottie-ios repo by referencing <code>https://github.com/airbnb/lottie-ios.git</code> instead.</p> <h3 dir="auto"><a id="user-content-cocoapods" class="anchor" aria-hidden="true" href="#cocoapods"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a>CocoaPods</h3> <p dir="auto">Add the pod to your Podfile:</p> <div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="pod 'lottie-ios'"><pre><span class="pl-en">pod</span> <span class="pl-s">'lottie-ios'</span></pre></div> <p dir="auto">And then run:</p> <div class="highlight highlight-source-ruby notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="pod install"><pre><span class="pl-en">pod</span> <span class="pl-en">install</span></pre></div> <p dir="auto">After installing the cocoapod into your project import Lottie with</p> <div class="highlight highlight-source-swift notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import Lottie"><pre><span class="pl-k">import</span> <span class="pl-en">Lottie</span></pre></div> <h3 dir="auto"><a id="user-content-carthage" class="anchor" aria-hidden="true" href="#carthage"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a>Carthage</h3> <p dir="auto">Add Lottie to your Cartfile:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="github "airbnb/lottie-ios" "master""><pre class="notranslate"><code>github "airbnb/lottie-ios" "master" </code></pre></div> <p dir="auto">And then run:</p> <div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="carthage update"><pre class="notranslate"><code>carthage update </code></pre></div> <p dir="auto">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 <code>carthage update</code> produced.</p> <h3 dir="auto"><a id="user-content-data-collection" class="anchor" aria-hidden="true" href="#data-collection"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a>Data collection</h3> <p dir="auto">The Lottie SDK does not collect any data. We provide this notice to help you fill out <a href="https://developer.apple.com/app-store/app-privacy-details/" rel="nofollow">App Privacy Details</a>.</p> <h2 dir="auto"><a id="user-content-contributing" class="anchor" aria-hidden="true" href="#contributing"><svg class="octicon octicon-link" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path d="m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z"></path></svg></a>Contributing</h2> <p dir="auto">We always appreciate contributions from the community. To make changes to the project, you can clone the repo and open <code>Lottie.xcworkspace</code>. This workspace includes:</p> <ul dir="auto"> <li>the Lottie framework (for iOS, macOS, and tvOS)</li> <li>unit tests and snapshot tests (for iOS, must be run on an iPhone 8 simulator)</li> <li>an Example iOS app that lets you browse and test over 100 sample animations included in the repo</li> </ul> <p dir="auto">All pull requests with new features or bug fixes that affect how animations render should include snapshot test cases that validate the included changes.</p> <ul dir="auto"> <li>To add a new sample animation to the snapshot testing suite, you can add the <code>.json</code> file to <code>Tests/Samples</code>. Re-run the snapshot tests to generate the new snapshot image files.</li> <li>To update existing snapshots after making changes, you can set <code>isRecording = true</code> in <code>SnapshotTests.swift</code> <code>setUp()</code> method and then re-run the snapshot tests.</li> </ul> <p dir="auto">The project also includes several helpful commands defined in our <a href="https://github.com/airbnb/lottie-ios/blob/master/Rakefile">Rakefile</a>. To use these, you need to install <a href="https://bundler.io/" rel="nofollow">Bundler</a>:</p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ sudo gem install bundle $ bundle install"><pre>$ sudo gem install bundle $ bundle install</pre></div> <p dir="auto">For example, all Swift code should be formatted according to the <a href="https://github.com/airbnb/swift">Airbnb Swift Style Guide</a>. After making changes, you can reformat the code automatically using <a href="https://github.com/nicklockwood/SwiftFormat">SwiftFormat</a> and <a href="https://github.com/realm/SwiftLint">SwiftLint</a> by running <code>bundle exec rake format:swift</code>. Other helpful commands include:</p> <div class="highlight highlight-source-shell notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="$ bundle exec rake build:all # builds all targets for all platforms $ bundle exec rake build:package:iOS # builds the Lottie package for iOS $ bundle exec rake test:package # tests the Lottie package $ bundle exec rake format:swift # reformat Swift code based on the Airbnb Swift Style Guide"><pre>$ bundle <span class="pl-c1">exec</span> rake build:all <span class="pl-c"><span class="pl-c">#</span> builds all targets for all platforms</span> $ bundle <span class="pl-c1">exec</span> rake build:package:iOS <span class="pl-c"><span class="pl-c">#</span> builds the Lottie package for iOS</span> $ bundle <span class="pl-c1">exec</span> rake test:package <span class="pl-c"><span class="pl-c">#</span> tests the Lottie package</span> $ bundle <span class="pl-c1">exec</span> rake format:swift <span class="pl-c"><span class="pl-c">#</span> reformat Swift code based on the Airbnb Swift Style Guide</span></pre></div> </article></div></div><div class="tab-pane" id="changelog_content"></div></div></div><div class="clearfix"></div></div></article></section></div><script>$copy_to_clipboard = $('ol.results img.copy') var clip = new ZeroClipboard( $copy_to_clipboard, { moviePath: "/flashes/ZeroClipboard.swf", forceHandCursor: true } ); clip.on( 'noflash', function ( client, args ) { // provide a recursive wait method // that checks for the hover on the popover/clipboard // before hiding so you can select text function closePopoverForNode(node){ setTimeout(function() { if (!$(node).is(':hover') && !$(".popover:hover").length) { $(node).popover("hide") } else { closePopoverForNode(node) } }, 500); } // With no flash you should be able to select the text // in the popover $copy_to_clipboard.popover({ trigger: "manual", container: "body" }).on("click", function(e) { e.preventDefault(); }).on("mouseenter", function() { $(this).popover("show"); $(".popover input").select() }).on("mouseleave", function() { closePopoverForNode(this) }); }); // When Flash works, jusst do a normal popover clip.on("load", function(client) { client.on( "complete", function(client, args) { $("h4.has-flash").text("Saved to clipboard"); $(".popover").addClass("saved") }); clip.on( 'mouseover', function ( client, args ) { $(this).popover('show') }); clip.on( 'mouseout', function ( client, args ) { $(this).popover('hide') }); }); // When the page loads up check for a #changelog and load the changelog instead of the README if possible $(document).ready(function() { if ($("#asset_switcher").length == 0) { return } if (location.hash == "#changelog") { $("#changelog_tab").click() } // Make it easy to get a changelog URL for C+Ping $('#asset_switcher a').on('shown.bs.tab', function (e) { var is_changelog = $(e.target).data("target") == "#changelog_content" var new_hash = (is_changelog) ? "#changelog" : "" var current_url = window.location.toString().split('#')[0] history.replaceState(null, null, current_url + new_hash) }) })</script><div class="clearfix"></div><footer class="page-footer"><section class="container"><div class="row"><article class="col-md-8 col-lg-8 col-sm-12 col-md-offset-2 col-lg-offset-2 col-xs-12"><h4>CocoaPods is a project from</h4><p class="contributors"> <a href="https://twitter.com/dnkoutso">Dimitris Koutsogiorgas</a>, <a href="https://dani.builds.terrible.systems/">Danielle Lancashire</a>, <a href="https://github.com/amorde">Eric Amorde</a>, <a href="https://orta.io">Orta Therox</a>, <a href="https://github.com/paulb777">Paul Beusterien</a>, <a href="https://segiddins.me">Samuel Giddins</a>, and <a href="https://cocoapods.org/about#team">The CocoaPods Dev Team</a> with contributions from <a href="https://github.com/CocoaPods/Specs/graphs/contributors">many, many others</a>.</p><h4>Lovingly sponsored by</h4><p class="sponsors"><a href="http://artsy.net">Artsy</a>, <a href="http://www.usebutton.com">Button</a>, <a href="http://www.capitalone.io">Capital One</a>, <a href="https://circleci.com">CircleCI</a>, <a href="http://discontinuity.eu">Discontinuity</a>, <a href="https://www.emergetools.com">Emerge Tools</a>, <a href="http://www.fngtps.com">Fingertips</a>, <a href="https://developers.google.com">Google</a>, <a href="https://www.heroku.com">Heroku</a>, <a href="https://www.jsdelivr.com">jsDelivr</a>, <a href="https://realm.io">Realm</a>, <a href="https://pspdfkit.com/">PSPDFKit</a>, <a href="http://www.rubymotion.com">RubyMotion</a>, <a href="https://www.sauspiel.de">Sauspiel</a>, <a href="https://www.slack.com">Slack</a>, <a href="https://www.soundcloud.com">SoundCloud</a>, <a href="https://www.stripe.com">Stripe</a>, <a href="https://www.squareup.com">Square</a>, and <a href="http://www.technologyastronauts.ch">Technology Astronauts</a>.</p></article></div></section></footer><footer class="footer-links"><section class="container"><div class="row"><article class="col-md-8 col-lg-8 col-sm-12 col-md-offset-2 col-lg-offset-2 col-xs-12"><a class="cocoapods-small-logo" href="https://cocoapods.org"></a><ul><li class="col-md-3 col-sm-3 col-xs-6"><a href="https://guides.cocoapods.org/using/troubleshooting.html">Support</a></li><li class="col-md-3 col-sm-3 col-xs-6"><a href="https://github.com/CocoaPods/CocoaPods">GitHub Repo</a></li><li class="col-md-3 col-sm-3 col-xs-6"><a href="https://status.cocoapods.org">Web Properties Status</a></li><li class="col-md-3 col-sm-3 col-xs-6"><a href="https://twitter.com/CocoaPods">@CocoaPods</a></li><li class="col-md-3 col-sm-3 col-xs-6"><a href="http://groups.google.com/group/cocoapods">Mailing List</a></li><li class="col-md-3 col-sm-3 col-xs-6"><a href="https://cocoapods.org/about"><span class="visible-lg-span">CocoaPods</span> Dev Team</a></li><li class="col-md-3 col-sm-3 col-xs-6"><a href="https://guides.cocoapods.org/syntax/podfile.html">Podfile Doc<span class="hidden-lg-span">s</span><span class="visible-lg-span">umentation</span></a></li><li class="col-md-3 col-sm-3 col-xs-6"><a href="https://cocoapods.org/legal">Legal / Conduct</a></li></ul></article></div></section></footer></body></html>