kunalSBasic commented on issue #560: URL: https://github.com/apache/cordova-plugin-file/issues/560#issuecomment-2127093336
> @breautek - well after a VERY long time of frustration, I finally found the answer for iOS. > > Please update the `cordova-plugin-file` documentation. Honestly, I can't believe its not listed anywhere in official Cordova documentation; especially the `cordova-plugin-file` docs. For anyone wanting to use `cordova-plugin-file` (and maybe `cordova-plugin-file-transfer`) to save files to the public `On My iPhone --> Downloads` folder, they will need to add the following TWO keys to their apps `info.plist` file: > > ``` > <key>UIFileSharingEnabled</key> > <true/> > <key>LSSupportsOpeningDocumentsInPlace</key> > <true/> > ``` > > Yup...THATS IT. What this does is create symlink to everything in the apps documents folder (ie: `cordova.file.documentsDirectory`). When the user goes to the `On My iPhone` root folder, they will see a `Downloads` folder AND individual app folders for every app that has these values set to `true`. This allows users to find/navigate every apps root Documents folder as if it were a part of their general `Downloads` folder. > > Unreal....spun my wheels on this one...well....for at least 3 years. Always coming up with some ugly hybrid that was always breaking; esp with each new version of iOS. But again....in all the years of searching for a solution, I never once saw any reference to these keys before. Unreal its not included in any Apache Cordova docs. > > Actually, there is an OPEN request to document this very thing....its three years old! #392 - in fact, if you do a google search for `cordova UIFileSharingEnabled` VERY little comes back. How come, in general, the community simply does not know about these keys? > > Sorry, on a bit of rant....mind blowing how this has escaped so many for so long. > > Now...this makes me wonder....are there similar and/or corresponding setting/preferences in Android that make the apps internal directories available to users to browse so we don't have to depend on `externalRootDirectory` storage locations? OMG finally found the answer to my problem on which I have been banging my head on since last 4 days. Thank you so much @rolinger for such a detailed answer, really appreciate your effort. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@cordova.apache.org For additional commands, e-mail: issues-h...@cordova.apache.org