问题
I have an iOS app where I present an image picker the
self.picker = [[UIImagePickerController alloc] init];
self.picker.delegate = self;
self.picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
self.popover = [[UIPopoverController alloc] initWithContentViewController:self.picker];
[self.popover presentPopoverFromRect:CGRectMake(100, 100, 1, 1) inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
The app however doesn't ask for permissions at all, it just displays the error message "This app does not have access to your photos or videos".
Any ideas on what might cause this?
Thanks in advance!
回答1:
The issue was the the Bundle Display Name wasn't set in the Info.plist
回答2:
in iOS 9, UIPopoverController is deprecated and why don't you use presentViewController instead.
来源:https://stackoverflow.com/questions/33009290/uiimagepickercontroller-not-asking-for-permissions-on-ios-9