I have added ALAssetsLibrary framework to my project and for some reason XCode doesnt detect it.
I have no code completion, and XCode gives a warning and then crashes when I use the following code
ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init];
[library enumerateGroupWithTypes:ALAssetsGroupAlbum
usingBlock:assetGroupEnumerator
failureBlock:^(NSError *error){
NSLog(@"A problem occured");
}];
It doesnt detect what ALAssetsLibrary is and the warning which leads to a crash is
warning: ‘ALAssetsLibrary’ may not respond to ‘-enumerateGroupWithTypes:usingBlock:failureBlock:’

Why isnt XCode detecting the framework?
I have added it to my project as well as imported it.


I would really appreciate the help with this, I dont understand what I did wrong. Thanks
First, you’re importing AssetsLibrary.h, are you sure this refers to the class ALAssetsLibrary and ALAssetsGroupAlbum?
Second, I’m not sure it failing to find it is the problem, I imagine there would be a different error in that case, such as, this class is not defined, first use in function.
It’s saying unrecognized selector, which means there might be a problem with your pointers.