A wrapper for librlottie + Xcode project. Support Carthage && CocoaPods && SwiftPM.

What's New

0.2.1 - Patch



  • Fix the compile issue on Xcode 12 because of watchOS 2 simulator does not support thread local
  • Disable the lottie model cache, there are no C-API to disable the cache which may cause OOM on iOS platform
  • Upstream commit 3cd0015

librlottie + Xcode

CI Status Version License Platform Carthage compatible SwiftPM compatible

A wrapper for rlottie + Xcode project. This enables Carthage && SwiftPM support.

This repo also including the CocoaPods's spec file to use rlottie.


  • iOS 9
  • macOS 10.10
  • tvOS 9.0
  • watchOS 2.0


The Samsung's rlottie now release the first tag version, see: rlottie#159. This repo match the same version tag as upstream mostly.

However, if there are serious bugs due to the integration issue on Apple's platform (rlottie does not provide official iOS support), we may release patch version, which does not match the upstream, the upstream commit HASH is provided here:

  • 0.1.0: a717479
  • 0.2.1: 3cd0015

If you're facing cache issues. Please update your Package Manager by following the steps:

  • CocoaPods: pod cache clean librlottie && pod update
  • Carthage: rm -rf ~/Library/Caches/org.carthage.CarthageKit && carthage update --cache-builds
  • SwiftPM: Xcode Clean

For iOS and Simulator

The rlottie source code use C++ Thread Local feature. However, iOS use system provided ABI for C++ thread local support but not language side, which works only on iOS 9.0+, and does not support 32-bit i386 Simulator.

This is why we have to limit the min deployment target version on iOS. Learn more here: Why does Apple clang disallow C++11 thread_local when 'official' clang supports it



librlottie is (via this repo) available through Carthage.

github "SDWebImage/librlottie-Xcode"


librlottie is available through CocoaPods.

pod 'librlottie'


librlottie is available through Swift Package Manager.

let package = Package(
    dependencies: [
        .package(url: "", from: "0.2.0")
    // ...


Use librlottie as you would normally, this is just a repo that adds an Xcode proj.

For Swift Package Manager user, it's recommended to use the modular import instead of C headers.

  • Objective-C
@import librlottie;
// or if you don't use module
#import <rlottie/rlottie_capi.h>
  • Swift
import librlottie

For C++ user

The rlottie umbrella header and modulemap does not contains C++ header rlottie.h, because Swift/Objective-C can not import C++ interface (Objective-C++ can, but with clang module disabled).

If you need the C++ interface, use the public header search path to include, make sure you have disable module as well.


librlottie is available under the LGPL License.


  • Swift Tools 5.0.0
View More Packages from this Author


  • None
Last updated: Tue May 07 2024 23:53:12 GMT-0900 (Hawaii-Aleutian Daylight Time)