3

I was using AlAsset library before, now for more info iam using Photos framework, I am able to get the photos and its info, but how to add to photo album back.

virtplay
  • 550
  • 7
  • 18

2 Answers2

3

try this

[[PHPhotoLibrary sharedPhotoLibrary] performChanges:^{
        [PHAssetChangeRequest creationRequestForAssetFromImage:[info valueForKey:UIImagePickerControllerOriginalImage]];
    } completionHandler:^(BOOL success, NSError *error) {
        if (success) {
             NSLog(@"Success");
        }
        else {
            NSLog(@"write error : %@",error);
        }
    }];

Check this answer, >> https://stackoverflow.com/a/31694088/2226263

Community
  • 1
  • 1
Karan Alangat
  • 2,154
  • 4
  • 25
  • 56
1

You create and use PHAssetChangeRequest objects within a photo library change block to create, delete, or modify PHAsset objects. See Documentation

Also check out this answer.

Community
  • 1
  • 1
Daniel
  • 23,129
  • 12
  • 109
  • 154