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.
From this link
On my iPhone, there is no video in My Photo Stream album but only photos.