Lottie for iOS

repository·master·Indexed 12 days ago

https://github.com/airbnb/lottie-ios

A mobile library for iOS, macOS, tvOS, and visionOS that parses Adobe After Effects animations exported as JSON with bodymovin and renders vector animations natively in real-time. Version 4.6.1 supports installation via Swift Package Manager, CocoaPods, and Carthage.

Tokens
660
Snippets
3
Records
6
Agent score
49%

What's inside Lottie

  1. How EpoxyCore is integrated into Lottie

    master
    EpoxyCore is not imported as a separate module or dependency. Due to packaging and compilation requirements across different package managers (SPM, CocoaPods, Carthage, and NPM), the EpoxyCore source code is included directly within the Lottie library and compiled as a single unit. This prevents dependency conflicts and ensures compatibility across all distribution methods.
  2. Install Lottie via Carthage

    master

    To install Lottie using Carthage, add the dependency to your Cartfile and run carthage update. After the build completes, you must manually link the framework in your Xcode project:

    1. Open your application target in Xcode.
    2. Go to the General tab.
    3. Locate the Linked Frameworks and Libraries section.
    4. Drag and drop lottie-ios.framework from the Carthage/Build/iOS directory into this section.
    # In your Cartfile
    github "airbnb/lottie-ios" "master"
    carthage update
  3. Install Lottie via Swift Package Manager

    master

    You can install Lottie using Swift Package Manager (SPM). It is highly recommended to use the lottie-spm repository instead of the main lottie-ios repository. The lottie-spm repo is significantly smaller because it contains a pointer to a precompiled XCFramework rather than the full git history and source code.

    To install via the Xcode UI:

    1. In Xcode, select FileAdd Packages...
    2. Enter https://github.com/airbnb/lottie-spm.git

    Alternatively, add the dependency directly to your Package.swift file.

    .package(url: "https://github.com/airbnb/lottie-spm.git", from: "4.6.1")
  4. Install Lottie via CocoaPods

    master

    To install Lottie using CocoaPods, add the following line to your Podfile and run pod install. After installation, you can use the library by importing the Lottie module.

    # In your Podfile
    pod 'lottie-ios'
    // In your Swift code
    import Lottie
  5. Verify Lottie XCFramework code signature

    master

    For security, Lottie 4.4.0 and later distribute XCFramework bundles that include a code signature. These bundles are self-signed under the name "Lottie iOS".

    You can verify the signature in Xcode by selecting Lottie.xcframework and checking the identity. The fingerprint for the self-signed bundle is:

    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