Мое приложение падает на UIDocumentPickerViewController

Я работаю над совместным использованием файлов в моем приложении для iOS, я новичок вUIDocumentPickerViewController, Я не знаю, почему мое приложение падает.

UIDocumentPickerViewController *documentPicker = [[UIDocumentPickerViewController alloc] initWithDocumentTypes:@[@"public.image"] inMode:UIDocumentPickerModeImport];
documentPicker.delegate = self;
documentPicker.modalPresentationStyle = UIModalPresentationFormSheet;
[self presentViewController:documentPicker animated:YES completion:nil];

Приложение падает на выделенные линии.

Кто-нибудь делал это ранее? Я хочу сделать то же самое, что и вложение ниже

Ответы на вопрос(4)

Ваш ответ на вопрос