I'm building an app that has the user take photos from their library to do things. I'm using X-code, and I had this code under 'didFinishLaunchingWithOptions' but keep getting an 'undeclared identifier' error. What to do?
ALAssetsLibraryGroupsEnumerationResultsBlock assetGroupEnumerator =
^(ALAssetsGroup *assetGroup, BOOL *stop) {
if (assetGroup != nil) {
// do somthing
}
};
ALAssetsLibraryAccessFailureBlock assetFailureBlock = ^(NSError *error) {
LogError(@"Error enumerating photos: %@",[error description]);
};
NSUInteger groupTypes = ALAssetsGroupAll;
[library enumerateGroupsWithTypes:groupTypes usingBlock:assetGroupEnumerator failureBlock:assetFailureBlock];
Too late an answer but you need to define library
or better use a class method if you are going to reuse the library for more queries