For the longest time I have preloaded specific files into my cordova app using the cordova.file.applicationDirectory. To date, these files have only been read-only, but now I need to update these files while the app is running...but the applicationDirectory is a read-only folder on both Android and iOS. So I need to move the preloaded files to another location.
I want to change the directory of these preloaded file to dataDirectory (or to another folder that is read-write). However, preloaded files on Android were added to the ../platforms/android/assets folder, and on iOS, via Xcode, I simply just added them to the root of the project. After that on both OSs I can access the read-only files with applicationDirectory.
However, where do I manually add the files to the project so they get preloaded into the cordova.file.dataDirectory?
The cordova-plugin-file docs show that on Android the dataDirectory is mapped to /data/data/<app-id>/files and on iOS it is mapped to ~/Library/Application Support/<bundle-id>/files - but those are device mappings, after the app is installed. What are the project directories, the project folders that I add those files to so they are preloaded in the dataDirectory upon app install?