[ad_1]
So in my app I’ve created a Check.JSON file that I would like the person to have the ability to transfer to the paperwork listing, exterior of the app. I perceive I’ve to do that through the use of UIDocumentPickerViewController, however have not discovered any approach to proceed. I’ve created the Check.JSON file, and may use it from variable information.
I’ve this following code to open the UIDocumentPickerViewController:
let documentPicker =
UIDocumentPickerViewController(forExporting: [.documentsDirectory])
documentPicker.delegate = self
// Set the preliminary listing.
documentPicker.directoryURL = .documentsDirectory
// Current the doc picker.
current(documentPicker, animated: true, completion: nil)
How can I connect the info file to the UIDocumentPickerViewController, so I can place it within the paperwork listing?
[ad_2]
