小编hst*_*tdt的帖子

Xcode 9.2 UIDocumentBrowserViewController:无法从bookmarkableString创建URL

更新:Xcode 9.3修复了它.


在中创建UIDocument文件时 UIDocumentBrowserViewController

在此输入图像描述

[默认] [错误]无法解析书签.错误:错误域= NSFileProviderInternalErrorDomain代码= 1"不允许读者访问该URL." UserInfo = {NSLocalizedDescription =不允许读者访问该URL.}

[DocumentManager]无法从bookmarkableString创建URL(错误域= NSFileProviderInternalErrorDomain Code = 1"不允许读者访问URL."UserInfo = {NSLocalizedDescription =不允许读者访问URL.})

代码在Xcode 9.1中运行良好,但在Xcode 9.2中失败.与wwdc 2017几乎相同的代码.

func documentBrowser(_ controller: UIDocumentBrowserViewController, didRequestDocumentCreationWithHandler importHandler: @escaping (URL?, UIDocumentBrowserViewController.ImportMode) -> Void) {
    let newDocumentURL: URL? = R.file.templateDocument()

    // Set the URL for the new document here. Optionally, you can present a template chooser before calling the importHandler.
    // Make sure the importHandler is always called, even if the user cancels the creation request.

    if newDocumentURL …
Run Code Online (Sandbox Code Playgroud)

xcode core-data ios uidocument

9
推荐指数
0
解决办法
1062
查看次数

如何设置与 NSPersistentCloudKitContainer 的有序关系?

当我检查时Used with CloudKit,错误Folder.children must not be ordered出现了。关于有序关系的任何想法?

IDE:Xcode11 beta3

在此处输入图片说明

这是Folder实体。

在此处输入图片说明

core-data swift xcode11 nspersistentcloudkitcontainer

9
推荐指数
1
解决办法
1127
查看次数