Does Swift support saving videos from `Data` to the Photos app?

Can I do the same with the image?

PHAssetChangeRequest.creationRequestForAsset(from: UIImage(data: bytes)
  • I do not want to save it as a temporary file.

Add a Comment

Replies

Yes, you can use PHAssetCreationRequest and the following API

https://developer.apple.com/documentation/photokit/phassetcreationrequest/1622684-addresource