UIDocumentBrowserViewController is totally dead.

Why my files created by my app and picked by user via the UIDocumentBrowserViewController are all not writable? since it's totally working well in iOS 12?


not only my app, others (like mindnode) can't open their files too. please someone tell my why.

Replies

And, what i`m talking about is, in my read(from url: URL), i have NO READ PERMISSION of the url passed to me !

Did you try opening and closing the security scope?


Like this:


guard url.startAccessingSecurityScopedResource() else {
  // Handle the failure here.
  return
}

// Make sure you release the security-scoped resource when you are done.
defer { url.stopAccessingSecurityScopedResource() }

NSFileCoordinator().coordinate(readingItemAt: url, error: &error) { (url) in
.........
//read files
.........