I want to save a video that is taken using a custom camera to a particular album say NewAlbum
in the Photos Library
using the Photos Framework
.
I have found some answers but they referred to use of ALAssetsLibrary
which is deprecated now.
Kindly let me know if you need any more details, also rectify me if I missed something. Thanks
I found a solution To create a PHAsset from an Video:
Code Block 1:
you can add the
PHAsset
with the following snippet:Code Block 2:
EDIT Example for create a
PHAssetCollection
In this case, I fetched the create
PHAssetCollection
after it was created in theperformChanges(_:,completionHandler:)
closure and put it in the@escaping
closure of that function.