Update: Xcode 9.3 beta fixed it.
When creating a UIDocument file in a UIDocumentBrowserViewController

[default] [ERROR] Failed to resolve bookmark. Error: Domain Error = NSFileProviderInternalErrorDomain Code = 1 "The reader is not allowed to access the URL." UserInfo = {NSLocalizedDescription = The reader is not allowed to access the URL.}
[DocumentManager] Failed to create bookmark bookmarkString URL (Error Domain = NSFileProviderInternalErrorDomain Code = 1 "Reader is not allowed to access the URL." UserInfo = {NSLocalizedDescription = The reader is not allowed to access the URL.})
The code works well in Xcode 9.1, but does not work in Xcode 9.2. almost the same code as wwdc 2017.
func documentBrowser(_ controller: UIDocumentBrowserViewController, didRequestDocumentCreationWithHandler importHandler: @escaping (URL?, UIDocumentBrowserViewController.ImportMode) -> Void) { let newDocumentURL: URL? = R.file.templateDocument()

ios xcode core-data uidocument
hstdt
source share