Coder Social home page Coder Social logo

stasmilke / librlottie-xcode Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sdwebimage/librlottie-xcode

0.0 1.0 1.0 67 KB

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

Objective-C 30.50% C 6.89% Swift 23.59% Ruby 31.59% C++ 7.43%

librlottie-xcode's Introduction

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.

Requirements

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

Note

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

Previously this repo has same tag like v0.1.0, which use the HASH a717479. Now it's removed. 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

Installation

Carthage

librlottie is (via this repo) available through Carthage.

github "SDWebImage/librlottie-Xcode"

CocoaPods

librlottie is available through CocoaPods.

pod 'librlottie'

SwiftPM

librlottie is available through Swift Package Manager.

let package = Package(
    dependencies: [
        .package(url: "https://github.com/SDWebImage/librlottie-Xcode", from: "0.2.0")
    ],
    // ...
)

Usage

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.

License

librlottie is available under the LGPL License.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.