[File Plugin] iOS storage in Library vs.Documents folder issue
Forge component by OutSystems R&D

It seems that this plugin only handles files in the Library directory of an iOS app. Users who already have files in the Documents folder of my app are not able to access those. It is important to be able to access the Documents folder, as other apps can leave intra-app documents in another app's Document/Inbox folder.

I tried to set a preference for my app through the extensibility configuration json, as documented in the Cordova plugin readme:

<preference name="iosPersistentFileLocation" value="Compatibility" />

But it seems that it gets ignored.

Anybody has a solution to this problem to access files in the iOSdocuments folder?


Hi Denis, I think you must check an original Cordova plugin an see how it's plugin work.
reference to this link https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-file/index.html

from my experience, to download the file in ios or android  and then save the file to Downloads folder ( mean download folder phone system), you must set "Device Path" for android and ios in function RequestDirectoryFromFileSystem, I create a function like this  

if the device is android , set GetFileSystem javascript to  " var fileSystemType = cordova.file.externalRootDirectory + '/Download/'; " and if the device is IOS set "var fileSystemType = cordova.file.documentsDirectory;"

note:  for information, just Android Device can switch Selected Storage Type,  because of IOS save file just works on Internal storage

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.