UIDocumentPickerViewController not working properly

I added UIDocumentPickerViewController in my app. Now when i open documentPicker from my app it picker opes but doesn't allow to select docs. It keeps showing


documents in iCloud Drive are not available because the iCloud Drive setting is disabled


I have turned on iCloud Drive from settings it still keeps showing that. I am able to upload files using iCloud Drive app. but my app can't seem to be abble to select document.

What other setting i need to update? Please help.

See a possible solution here :

h ttps://stackoverflow.com/questions/30619107/uidocumentpickerviewcontroller-no-documents-because-icloud-not-available


Otherwise, you probably have to set NSUbiquitousContainer


Should have a look here :

h ttps://developer.apple.com/library/content/documentation/General/Conceptual/iCloudDesignGuide/Chapters/DesigningForDocumentsIniCloud.html


and some help here :

h ttps://stackoverflow.com/questions/25203697/exposing-an-apps-ubiquitous-container-to-icloud-drive-in-ios-8

UIDocumentPickerViewController not working properly
 
 
Q