Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @import Photos;
- @import AVKit;
- [PHPhotoLibrary.sharedPhotoLibrary performChanges:^{
- NSURL *url = [NSURL fileURLWithPath:[FileUtil filePath:fileName]];
- [PHAssetChangeRequest creationRequestForAssetFromVideoAtFileURL:url];
- } completionHandler:^(BOOL success, NSError * _Nullable error) {
- if (error) {
- NSLog(@"Error : %@", error);
- }
- if (success) {
- NSLog(@"Finished updating assets.");
- }
- }];
Add Comment
Please, Sign In to add comment