【问题标题】:UIDocumentBrowserViewController returning error importing to dropboxUIDocumentBrowserViewController 返回错误导入到 Dropbox
【发布时间】:2020-05-21 23:38:33
【问题描述】:

我正在使用 UIDocumentBrowserViewController 并在尝试使用 Dropbox 创建新文件时遇到以下错误:

Couldn’t communicate with a helper application.

iCloud 或“在我的 iPad 上”(本地存储)不会出现此错误。

这个错误是什么意思?

更具体地说,我有以下代码可以调用importHandler

func documentBrowser(_ controller: UIDocumentBrowserViewController, didRequestDocumentCreationWithHandler importHandler: @escaping (URL?, UIDocumentBrowserViewController.ImportMode) -> Void) {

        let templateURL = Bundle.main.resourceURL!.appendingPathComponent("Templates").appendingPathComponent("Sphere-128.sculptura")

        importHandler(templateURL, .copy)

    }

在调用importHandler 后,我接到了对func documentBrowser(controller: UIDocumentBrowserViewController, failedToImportDocumentAt documentURL: URL, error: Error?) 的调用,出现上述错误。

Apple 的 Particles 应用似乎运行良好,所以这是我的配置所特有的。

将提交 DTS 并更新此问题。

更新

我注意到设备控制台出现以下错误:

importDocument: Unable to import the file to the FileProvider. Error: Error Domain=NSCocoaErrorDomain Code=4101 UserInfo={NSFileProviderErrorItemName=<private>, NSUserStringVariant=Move, NSFilePath=<private>, NSUnderlyingError=0x282d11dd0 {Error Domain=DBFileProviderErrorDomain Code=1}}

【问题讨论】:

    标签: ios uidocumentbrowserviewcontroller


    【解决方案1】:

    这似乎是 Dropbox 文件提供程序中的一个错误。在 GarageBand 中创建文档会产生相同的错误。我怀疑这是因为像我的应用程序一样,GarageBand 使用包(目录)而不是文件来存储文档。其他使用文件的应用程序(粒子演示、页面等)运行良好。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-05-19
      • 2018-09-25
      • 2010-12-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多