Hi I am calling ALAssetsLibrary's
-enumerateGroupsWithTypes:ALAssetsGroupAll usingBlock:block failureBlock:failure;
then inside the enumeration block i want to compare the type of group returned and add it to the relevant array. I have tried
^( ALAssetsGroup *group, BOOL *stop )
{
NSLog(@"Group %@", group );
ALAssetGroupType assetType = (ALAssetGroupType)[group valueForProperty:ALAssetsGroupPropertyType];
NSLog( @"Asset type %@", assetType );
switch( assetType )
{
case ALAssetsGroupAplbum :
NSLog( @"Found ALBUM" );
[albums addObject:group];
break;
}
}
The Initial log traces out "Group ALAssetsGroup - Name:Photo Library, Type:Album, Assets count:177"
The next log is "Asset type 2"
but the third log never get's called.
Any ideas what i am doing wrong?