Saturday, November 21, 2026
HomeiOS Developmentios - Transfer file from app to cellphone paperwork folder

ios – Transfer file from app to cellphone paperwork folder

[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]

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments