Saving image only created album

Discussion in 'iOS Programming' started by erdinc27, Feb 13, 2016.

  1. erdinc27 macrumors regular

    Jul 20, 2011
    I want to save a photo taken by using my application. Actually i can save it in album created programmatically but it saves the same photo in camera roll also. Is it default or should i make change in my code ? Here how my code looks like
    [self.lib enumerateGroupsWithTypes:ALAssetsGroupAlbum usingBlock:^(ALAssetsGroup *group, BOOL *stop) {
            if ([[group valueForProperty:ALAssetsGroupPropertyName] isEqualToString:@"Album_Name"]) {
                NSLog(@"ALBUM NAME %@", [group valueForProperty:ALAssetsGroupPropertyName]);
                [self.lib saveImage:takenImage toAlbum:@"Album_Name" completion:^(NSURL *assetURL, NSError *error) {
                    if (assetURL) {
                       // DO SOMETHING WITH PHOTO
                } failure:nil];
        } failureBlock:nil];
  2. xStep macrumors 68000

    Jan 28, 2003
    Less lost in L.A.
    As I understand it, albums are really just filters for the camera roll. I noticed that when using some Sony software. Deleting images from an album also does not delete from the roll. So it does not look like you have any control over that. I'd like to be wrong on this.
  3. erdinc27 thread starter macrumors regular

    Jul 20, 2011
    After making research it seem it is exactly how you said.
  4. AxoNeuron macrumors 65816


    Apr 22, 2012
    The Left Coast
    That's exactly right. The camera roll (now called All Photos) contains everything from all albums.

Share This Page