I need to export a video from my iOS app and get the asset id. In the past, you can use ALAssetsLibrary:
save image in camera roll and get asset url
But it's deprecated now. I wonder what would be the new way of achieving this now? Thanks!
I need to export a video from my iOS app and get the asset id. In the past, you can use ALAssetsLibrary:
save image in camera roll and get asset url
But it's deprecated now. I wonder what would be the new way of achieving this now? Thanks!
Copyright © 2021 Jogjafile Inc.
ALAssetsLibrary is deprecated. you should use PhotosLibrary.
See this https://developer.apple.com/documentation/photos/phphotolibrary
here is a sample code that saves the video to camera roll and gives you the url to the save video.
don't forget to
and add this code as an extension to PHAsset :
https://gist.github.com/jVirus/2f041bb8b1936093773f0bde42af3a49