2

I am trying to implement the document picker extension in my app. So In prepareForPresentationInMode method, I present my own navigation controller which shows the list of files. When user clicks on a file, I download the file and try to give the url path of the file to the app which invoked my extension as below,

    [(DocumentPickerViewController*)[self.navigationController delegate] dismissGrantingAccessToURL:[[(DocumentPickerViewController*) [self.navigationController delegate] documentStorageURL] URLByAppendingPathComponent:@"text.txt"]];

When I print the [(DocumentPickerViewController*) [self.navigationController delegate] documentStorageURL], it prints as null. Let me know if I am doing anything wrong.

CyberInfo
  • 240
  • 2
  • 9

1 Answers1

1

This read-only property contains the value returned by your File Provider extension’s documentStorageURL method. If you do not provide a File Provider extension, it returns nil.

As can be found here

You'll have to provide your own URL that lies inside of your extension's folder (for example NSTemporaryDirectory())

Kevin Griesbach
  • 668
  • 7
  • 19