How to save Live Photos having bounce or loop type to Photos Library?

174 Views Asked by At

I've been saved Live Photos to Photos Library as below.

PHPhotoLibrary.shared().performChanges({
    let request = PHAsseetCreationRequest.forAsset()
    request.addResources(with: .photo, fileURL: photoURL, options: nil)
    request.addResources(with: .pairedVideo, fileURL: videoURL, options: nil)
}, completionHandler: { (success: Bool, _) in
    /* Some codes after completion */
})

But as you may know, there's a new feature in Live Photos that users could edit Live Photos with new types (bounce, loop) above iOS 11.

That code I already written works well when it comes to normal Live Photos. But Live Photos made with new types (bounce, loop) does not work as I expected.

When I try to save Live Photos with that, I got this error:

ERROR: Err-1 not found in table FoundationErrors of bundle CFBundle </System/Library/Frameworks/Foundation.framework> (not loaded)

So is there any way to save Live Photos with new types (bounce, loop) to Photos Library?

0

There are 0 best solutions below