iPhone, “More than maximum 5 filtered album lists trying to register. This will fail.” Error

北城余情 提交于 2019-11-27 13:26:36

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 :)

darrinm

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.

flypig

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!