0

i want to delete a pdf file (for example a pdf file that are present on my iPhone) with the UIDocumentPickerViewController controller. In the info.plist I already support iTunes file sharing and support opening documents...

I want to delete the pdf file in the didPickDocumentsAt urls: method. But It doesn't work. Copy the pdf file into the app bundle is successfully but I can't delete the file from the device.

File should move from the device into my app bundle and delete it in the on my iPhone storage.

I hope you can enlighten me. Thank you.

1 Answers1

0

Set your document picker to open mode instead of import mode and copy the file manually wherever you want before deleting it. This may be very unexpected by the user though so warn them ahead of time the file is going to be deleted.

Thomas Deniau
  • 2,488
  • 1
  • 15
  • 15