“More than maximum 5 filtered albums trying to register. This will fail.” using AssetsLibrary

StackOverflow https://stackoverflow.com/questions/12140903

Question

I sometimes get "More than maximum 5 filtered albums trying to register. This will fail." when I call setAssetsFilter on a ALAssetsGroup.

Anyone knows why? I've seen similar questions but all related to the UIImagePickerController.

here the code:

ALAssetsLibrary *lib = [[ALAssetsLibrary alloc] init];

    [lib enumerateGroupsWithTypes:ALAssetsGroupSavedPhotos usingBlock:^(ALAssetsGroup *group, BOOL *stop) {

        [group setAssetsFilter:[ALAssetsFilter allPhotos]];
        [group enumerateAssetsWithOptions:NSEnumerationReverse usingBlock:^(ALAsset *result, NSUInteger index, BOOL *stop) {....}];
Was it helpful?

Solution

Most guys on this have seen this question:iOS 5 GM: : More than maximum 5 filtered album lists trying to register. This will fail. And this: iPhone, “More than maximum 5 filtered album lists trying to register. This will fail.” Error. So we can believe that this is a known issue bug. No big problem.

I also see this comment:

On iOS 5.1.1, I do check for the availablity of the source type and still get the warning when I call the image picker for the 5th time. I do not see this on iOS 6.0 so Apple seems to have fixed something. – Richard Altenburg - Brainchild

OTHER TIPS

I guess this is an Apple Bug!..Even Apple examples give the same Error. Better to ignore it!

Even I faced this issue, but got it fixed. you just need to change the source type of UIImagePickerController.

UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];

/* This works fine in IOS6 but has some problem in IOS5 */ // imagePicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;

imagePicker.sourceType = UIImagePickerControllerSourceTypeSavedPhotosAlbum; // This would Solve the problem.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top