更新: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) 当我检查时Used with CloudKit,错误Folder.children must not be ordered出现了。关于有序关系的任何想法?
IDE:Xcode11 beta3
这是Folder实体。
core-data ×2
ios ×1
nspersistentcloudkitcontainer ×1
swift ×1
uidocument ×1
xcode ×1
xcode11 ×1