I have successfully implemented a feature letting the user pick a file to my app through UIDocumentMenuViewController
and UIDocumentPickerViewController
.
But I cannot find out how can I detect the source of the file. There are sources like Files, Google Drive and DropBox etc.
func documentMenu(_ documentMenu: UIDocumentMenuViewController, didPickDocumentPicker documentPicker: UIDocumentPickerViewController)
func documentPicker(_ controller: UIDocumentPickerViewController, didPickDocumentAt url: URL)
I have gone through all the delegate functions and do not see any ways. Any help would be greatly appreciated.
Hello Calvin,
Please add delegate
UIDocumentMenuDelegate,UIDocumentPickerDelegate