I'm new to Swift. I was wondering how to make a completion handler for openDocument(withContentsOf:display:completionHandler:)
I implemented a part of the code but now I can't figure out how to complete it.
let documentController = NSDocumentController.shared()
let directoryURL = FileManager.default.urls(for: .desktopDirectory, in: .userDomainMask).first
let docURL = URL(string:"MyFile.docutest", relativeTo:directoryURL)
documentController.openDocument(withContentsOf: docURL!, display: true, completionHandler: <(NSDocument?, Bool, Error?) -> Void>)