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.