I have been stuck with this problem since last week and not able to find any solution online.
I am trying to save live photo using below code.
PHPhotoLibrary.SharedPhotoLibrary.PerformChanges(() =>
{
PHAssetCreationRequest req = PHAssetCreationRequest.CreationRequestForAsset();
req.AddResource(PHAssetResourceType.Photo, NSUrl.FromString(imagePath), null);
req.AddResource(PHAssetResourceType.PairedVideo, NSUrl.FromString(VideoPath), null);
Console.WriteLine("ok" + req );
}, (arg1, arg2) =>
{
});
This code crashes the app on line PHPhotoLibrary.SharedPhotoLibrary.PerformChanges. I have tried putting try catch block but it never hit the catch block. Is there anything I am missing in the code? Any help will be appreciated.