Failed to save videos in ios15

Dear:

When I use iOS15 save video camera equipment to album, show PHPhotosErrorInvalidResource. Videos stored in the sandbox can play normally, lower than ios15 can be saved. And only one camera video fails to save, others succeeds. Confused and hoping for help. Here is the code

[[PHPhotoLibrary sharedPhotoLibrary] performChanges:^{

        PHAssetChangeRequest *photoRequest = [PHAssetChangeRequest creationRequestForAssetFromVideoAtFileURL:url];

        PHAssetCollectionChangeRequest *albumChangeRequest = [PHAssetCollectionChangeRequest changeRequestForAssetCollection:collection];

        PHObjectPlaceholder *assetPlaceholder = [photoRequest placeholderForCreatedAsset];

        [albumChangeRequest addAssets:@[ assetPlaceholder ]];

    } completionHandler:^(BOOL success, NSError * _Nullable error) {

        [self performInMainThreadBlock:^{

            if (success) {

                successBlock();

            }else{

                failureBlock(error);

            }

        }];

    }]

It sounds like this might be a video format compatibility issue (that would cause the PHPhotosErrorInvalidResource). You could try checking the video with UIVideoAtPathIsCompatibleWithSavedPhotosAlbum(path)

I had this issues too, and try UIVideoAtPathIsCompatibleWithSavedPhotosAlbum(path), is also fail

and those video with error 3302, also cant airdop from macos to iphone

on iOS 14.6, the error is: Error Domain=PHPhotosErrorDomain Code=-1 "(null)"

I had this issues too, and try UIVideoAtPathIsCompatibleWithSavedPhotosAlbum(path), is also fail

Failed to save videos in ios15
 
 
Q