我正在尝试使用UIDocumentPickerViewController
从“文件”应用中选择文档,但有时我会收到空白屏幕的’Unable to initialize remote proxy for extension. The connection was interrupted’
错误消息。为什么会这样?我该如何解决这个问题?
代码段:
NSArray *arrContents = @[@"public.content",@"public.item",@"public.composite-content",@"public.data",@"public.database",@"public.calendar-event",@"public.message",@"public.presentation",@"public.contact",@"public.archive",@"public.disk-image",@"public.text",@"public.plain-text",@"public.utf8-plain-text",@"public.utf16-external-plain-text",@"public.utf16-plain-text",@"com.apple.traditional-mac-plain-text",@"public.rtf"];
UIDocumentPickerViewController *dvc = [[UIDocumentPickerViewController alloc]initWithDocumentTypes:arrContents inMode:UIDocumentPickerModeImport];
dvc.delegate = self;
dvc.allowsMultipleSelection = true;
[self presentViewController:dvc animated:true completion:nil];