When I try to read an image from the photo library I get the error, "More than maximum 5 filtered album lists trying to register. This will fail." The image is not read.
Any idea how to fix this?
When I try to read an image from the photo library I get the error, "More than maximum 5 filtered album lists trying to register. This will fail." The image is not read.
Any idea how to fix this?
I think you are not checking the source type. You might be doing
self.sourceType =UIImagePickerControllerSourceTypePhotoLibrary;
If this is the case, then you have to check the source type before assigning it directly. like
if ([UIImagePickerController isSourceTypeAvailable:
UIImagePickerControllerSourceTypePhotoLibrary])
{
// Set source to the Photo Library
self.sourceType =UIImagePickerControllerSourceTypePhotoLibrary;
}
I hope it helps
Instead of this
self.sourceType =UIImagePickerControllerSourceTypePhotoLibrary;
Use
self.sourceType =UIImagePickerControllerSourceTypeSavedPhotosAlbum;
This worked it out for me:
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
[picker dismissModalViewControllerAnimated:YES];
picker = nil;
UIImage *image = [info objectForKey:@"UIImagePickerControllerEditedImage"];
}
I just set "picker = nil;" after dismissing the ModalViewController and then it works perfect :)
Hope it's going to help you out too :)
The consensus (https://stackoverflow.com/questions/7689119/ios-5-gm-error-more-than-maximum-5-filtered-album-lists-trying-to-register) is that this is Apple's bug as even their own examples run into it. A radar has been filed against it.
This is happen when allocating and presenting the UIImagePickerController more than 5 times.... I guess that the IOS forgets to de-register something when releasing/dismissing the UIImagePickerController.
For help follow link : http://skhousee.blogspot.in/2012/06/error-more-than-max-5-filtered-album.html
UIImagePickerController *ipc = [[UIImagePickerController alloc] init];
ipc.delegate = self;
ipc.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
[self presentModalViewController:ipc animated:YES];
[ipc release];
-(void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
[self setModalInPopover:YES];
}
The answer was the issue only showed itself in iOS 5 Beta 6. After updating to beta 7 the issue is now gone.