⚠️ This repository is not longer maintained. Please use the latest dotlottie-ios here.
dotLottie is an open-source file format that aggregates one or more Lottie files and their associated resources into a single file. They are ZIP archives compressed with the Deflate compression method and carry the file extension of ".lottie".
dotLottieLoader is a library to help downloading and deflating a .lottie file, giving access to the animationUrl as well as included images.
View documentation, FAQ, help, examples, and more at dotlottie.io
To run the example project, clone the repo, and run pod install
from the Example directory first.
- Swift 5.0
- iOS 11
- macOS 10.12
- tvOS 10.0
- watchOS 6.0
dotLottieLoader-ios is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'dotLottieLoader'
.package(url: "https://github.com/dotlottie/dotLottieLoader-ios.git", from: "0.1.8")
import dotLottieLoader
DotLottieUtils.isLogEnabled = true
DotLottieLoader.load(name: "animation") { (dotLottieFile) in
// use dotLottieLoader.animationUrl to load the lottie animation as you normally would
}
DotLottieLoader.load(from: URL(string:"https://dotlottie.io/sample_files/animation.lottie")!){ (dotLottieFile) in
// use dotLottieLoader.animationUrl to load the lottie animation as you normally would
}
var creator = DotLottieCreator(animationUrl: URL(string: "https://assets7.lottiefiles.com/private_files/lf30_p25uf33d.json")!)
creator.create { url in
// use url to dotLottie
}
Evandro Harrison Hoffmann | [email protected]
dotLottieLoader-ios is available under the MIT license. See the LICENSE file for more info.