0

The photo stream groups return a count of 0 when filtering for videos. Here's the code to reproduce:

ALAssetsGroupType groupTypes = ALAssetsGroupPhotoStream;
ALAssetsFilter* assetTypes = [ALAssetsFilter allVideos];
ALAssetsLibrary* library = [[ALAssetsLibrary alloc] init];

ALAssetsLibraryAccessFailureBlock failureBlock = ^(NSError *error)
{
};

ALAssetsLibraryGroupsEnumerationResultsBlock enumGroupsBlock = ^(ALAssetsGroup *group, BOOL *stop)
{
    if (group)
    {
        [group setAssetsFilter:assetTypes];
        NSString* name = [group valueForProperty:ALAssetsGroupPropertyName];
        NSUInteger count = group.numberOfAssets;
        NSLog(@"name: %@, count: %lu", name, (unsigned long)count);
    }
};

[library enumerateGroupsWithTypes:groupTypes usingBlock:enumGroupsBlock failureBlock:failureBlock];

This happens with both the 'My Photo Stream' and the Shared Streams. Note that the Photos app does display the videos. Also note that filtering for photos (using [ALAssetsFilter allPhotos] above) does work. I've reproduced this on iOS 7.1.2 and 8.1.

Has anyone else seen this or found a workaround? Thanks!

Update (Oct 29, 2014): My Photo Stream does not support video, only the Shared Streams do.

timonroe
  • 101
  • 2
  • 6

2 Answers2

1

From this link

Which photo formats does My Photo Stream support?

My Photo Stream supports JPEG, TIFF, PNG, and most RAW photo formats. My Photo Stream doesn't work with video.

On my iPhone, there is no video in My Photo Stream album but only photos.

gabbler
  • 13,128
  • 4
  • 29
  • 41
  • Sorry... here's the rest of my response. Another thing to mention is that I did turn on 'iCloud Drive' (Settings -> iCloud -> iCloud Drive) and 'iCloud Photo Library (Beta)' (Settings -> iCloud -> Photos -> iCloud Photo Library (Beta)) on my iPhone that has 8.1 installed. Maybe "...doesn't work with video" means doesn't fully support it, yet? I wrote up a bug (18729083) and filed it with Apple to see if they'll provide additional information. Will update this thread when I hear back. – timonroe Oct 27 '14 at 14:42
  • I didn't turn on both settings, :). – gabbler Oct 27 '14 at 15:01
0

My PhotoStream never includes videos only photos. Shared Photo Streams however can contain videos. iCloud Photo Library is not fully supported in AssetsLibrary - you may switch to PhotoKit to get full iCloud Photo Library support.

holtmann
  • 5,957
  • 30
  • 42