我正在尝试从我的 Viewcontroller 中呈现 UIDocumentPickerViewController。有时我会收到错误消息,说无法与帮助应用程序通信。
我展示 DocumentPickerViewController 的方式是:
BHFilePickerViewController *documentPicker = [[BHFilePickerViewController alloc]initWithDocumentTypes:types inMode:UIDocumentPickerModeImport];
documentPicker.filePickerDelegate = self;
documentPicker.modalPresentationStyle = UIModalPresentationFullScreen;
[self presentViewController:documentPicker animated:true completion:nil];
其中, BHFilePickerViewController 是我的UIDocumentPickerViewController类型的自定义类。
发生问题时,我可以看到日志为
[DocumentManager] The view service did terminate with error: Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 "(null)" UserInfo={Message=Service Connection Interrupted}
Remote view controller crashed with error: Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 "(null)" UserInfo={Message=Service Connection Interrupted}. Trying to relaunch.
[u 571773A2-04B9-4EAB-A4AE-E0C629CB07AF:m (null)] [com.apple.DocumentManagerUICore.Service(1.0)] Connection to plugin interrupted while in use.
[DocumentManager] Failed to get the remote browser View Controller with error (Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.DocumentManagerUICore.Service.viewservice was interrupted, but the message was sent over an additional proxy and therefore this proxy has become invalid." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.DocumentManagerUICore.Service.viewservice was interrupted, but the message was sent over an additional proxy and therefore this proxy has become invalid.})
[DocumentManager] Remote view controller crashed with error: Error Domain=NSCocoaErrorDomain Code=4099 "The connection to service on pid 0 named com.apple.DocumentManagerUICore.Service.viewservice was interrupted, but the message was sent over an additional proxy and therefore this proxy has become invalid." UserInfo={NSDebugDescription=The connection to service on pid 0 named com.apple.DocumentManagerUICore.Service.viewservice was interrupted, but the message was sent over an additional proxy and therefore this proxy has become invalid.}. Trying to relaunch.
我是否以错误的方式呈现它?你有什么可以改进的?先感谢您。