Pick UIDocument automatically in UIDocumentBrowserVC
问题 I am using a uidocumentbrowservc and want to pick a UIDocument programmatically. In my case it is because i want to automatically load the last used UIDocument to save the user some time on launch, as my app seldom changes documents. My naive approach is to store last used URL in UserDefaults . Then in the viewDidLoad() of my uidocumentbrowservc I call presentDocument(at: URL) . But it doesn't work. And when i call URL.checkResourceIsReachable() I get the error: Error Domain