Guest User

Untitled

a guest
Oct 20th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. @import Photos;
  2. @import AVKit;
  3. [PHPhotoLibrary.sharedPhotoLibrary performChanges:^{
  4.  
  5. NSURL *url = [NSURL fileURLWithPath:[FileUtil filePath:fileName]];
  6. [PHAssetChangeRequest creationRequestForAssetFromVideoAtFileURL:url];
  7.  
  8. } completionHandler:^(BOOL success, NSError * _Nullable error) {
  9. if (error) {
  10. NSLog(@"Error : %@", error);
  11. }
  12.  
  13. if (success) {
  14. NSLog(@"Finished updating assets.");
  15. }
  16. }];
Add Comment
Please, Sign In to add comment