How to store data files permanently and locally only with iOS 5+ and Cordova 3.5? -
I would like to store some data files in a fairly stable location, which should not synchronize With iCloud
The following Cordova documentation, cordova.file.cache directory is my best choice:
cordova.file.cache directory < / Code> - The directory for cached data files or any such files that your app can easily reconstruct, the OS can erase these files when the device goes down on storage, however, the files here Do not trust the OS to delete
To control accessibility, I check the size of the data synchronized by iCloud:
- Install and launch your app
- Setting & Gt; ICloud & gt; Storage & amp; Backup & gt;
-
- If necessary, tap "Show all apps"
Well, my app is always very heavy ...
-
config.xml
< P>
& lt; Priority name = "Backup vibstorage" value = "none" /> & Lt; Priority name = "iosPersistentFileLocation" value = "library" />
Javascript
function onDevice Readie () {window.requestFileSystem = window.requestFileSystem || Window.webkitRequestFileSystem; Window.requestFileSystem (LocalFileSystem.PERSISTENT, 0, gotFS, function () {console.log ('Error FS');}); } Function found (file system) {window.cacheFS = fileSystem.cache directory; } Document.addEventListener ('Device Readie', OnDevice Read, False); And then, I use cacheFS.toURL () as a base directory for storing files.
Can you see what I am missing?
Apple says that the data that should not be synchronized should be a "back up" attribute, exchangeframe backlinks for NSERIL objects should be attributed to NSURL I do not know what the objects are, and how to apply attributes with Cordova ...
= "Post-text" item Prop = "text"> In fact, I searched a NoCloud folder created in the root of the app document directory. Not all data stored in this folder is uploaded to iCloud.
Comments
Post a Comment