错误'无法初始化扩展的远程代理。'在尝试使用“UIDocumentPickerViewController”选择文档时

时间:2017-11-24 13:36:09

标签: ios objective-c iphone

我正在尝试使用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];

截图: enter image description here

0 个答案:

没有答案