I need to use the assets library: i’ve found a snippets like this:
[library enumerateGroupsWithTypes:ALAssetsGroupAlbum
usingBlock:assetGroupEnumerator
failureBlock: ^(NSError *error) {
NSLog(@"Failure");
}];
and the compiler gives me the error like doesn’t recognize the block ^.
is there a setting or something to enable the blocks in the project?
thanks in advance
here is the complete error / code:
https://skitch.com/ghiboz/grpyc/xcode
Paolo
My original answer — Looks like you need to add the AssetsLibrary framework to your project.
My new answer — for your asset enumerations, get rid of the “struct” keyword in your block declarations. You don’t need them.
e.g.
and