Skip to content

QiuDaniel/QDLivePhotoKit

Repository files navigation

QDLivePhotoKit

Generate Live Photo from mp4 file

Installation

CocoaPods

The preferred installation method is with CocoaPods. Add the following to your Podfile:

pod 'QDLivePhotoKit', '~> 0.1.0'

Usage

Get the file as AVURLAsset

[[QDLivePhotoManager sharedManager] saveLivePhotoWithAsset:urlAsset completionHandler:^(BOOL success) {
        
    if (success) {
        NSLog(@"success");
        
    } else {
        NSLog(@"fail");
    }
}];

Get the file path

you must have the authority to access the file with path

[[QDLivePhotoManager sharedManager] saveLivePhotoWithPath:path completionHandler:^(BOOL success) {
        
    if (success) {
        NSLog(@"success");
        
    } else {
        NSLog(@"fail");
    }
}];

Requirements

iOS9.1 or later. Requires ARC

License

QDLivePhotoKit is released under the MIT license. See LICENSE for details.

About

Generate Live Photo from mp4 file.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published