This is like compiling:
Although, it was not tested, since I do not know for sure that it returns using allZeros .
It can return 0x00000 , unlike what you need, it is 0xFFFFFF .
Still may be a good reference for people in the future.
let assetLib = ALAssetsLibrary() assetLib.enumerateGroupsWithTypes(ALAssetsGroupType.allZeros, usingBlock: { (results, stop) in println(results) }, failureBlock: { (fail) in println(fail) })
EDIT:
Well, what happens if you do the following?
assetLib.enumerateGroupsWithTypes(0xFFFFFFFF, usingBlock: ...)
I get the following:
(ALAssetsGroup - Name:Instagram, Type:Album, Assets count:46, ) (ALAssetsGroup - Name:Snapchat, Type:Album, Assets count:0, ) (ALAssetsGroup - Name:Camera Roll, Type:Saved Photos, Assets count:681, ) (nil, )
Probably a bug like Jack Wu mentioned where they probably used enum , not NS_ENUM , and the translator broke down.
This may currently be a workaround.
Asset types
Constants for determining asset types.
enum { ALAssetsGroupLibrary = (1 << 0), ALAssetsGroupAlbum = (1 << 1), ALAssetsGroupEvent = (1 << 2), ALAssetsGroupFaces = (1 << 3), ALAssetsGroupSavedPhotos = (1 << 4), ALAssetsGroupPhotoStream = (1 << 5), ALAssetsGroupAll = 0xFFFFFFFF, };