Ошибка при открытии UIDocumentPickerViewController - PullRequest
0 голосов
/ 03 февраля 2020

Я пытаюсь представить UIDocumentPickerViewController из моего Viewcontroller. Иногда я получаю сообщение об ошибке Невозможно связаться с вспомогательным приложением.

Способ представления DocumentPickerViewController:

BHFilePickerViewController *documentPicker = [[BHFilePickerViewController alloc]initWithDocumentTypes:types inMode:UIDocumentPickerModeImport];
documentPicker.filePickerDelegate = self;
documentPicker.modalPresentationStyle = UIModalPresentationFullScreen;
[self presentViewController:documentPicker animated:true completion:nil];

Где, BHFilePickerViewController - мой пользовательский класс type 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.

Я представляю его неправильно? Что бы вы могли улучшить? Заранее спасибо.

...