Instead of UISaveVideoAtPathToSavedPhotosAlbum
, you can use the -[ALAssetsLibrary writeVideoAtPathToSavedPhotosAlbum:(NSURL *)videoPathURL completionBlock (ALAssetsLibraryWriteVideoCompletionBlock)completionBlock]
method (Apple Documentation here)
For example:
ALAssetsLibrary* library = [[ALAssetsLibrary alloc] init];
[library writeVideoAtPathToSavedPhotosAlbum:videoPathURL
completionBlock:^(NSURL *assetURL, NSError *error)
{
/* process assetURL */
}];
Important Note: The important thing to remember when dealing with ALAssetsLibrary is that the assetURL is only valid for the lifetime of the ALAssetsLibrary instance. So ensure you hold a reference to library until after you have finished processing the assetURL and any associated ALAsset.