I have these two lines in my app.js
Ti.Filesystem.remoteBackup = false; Ti.Database.remoteBackup = false;
however the data is still trying to be saved to the cloud.
I know I am missing something.
the app itself installs, then creates a DB (I don't install it) it opens it, and then uses sql to create the database itself. The app then opens up a http connection and downloads all the data to the
This was set on previous installs so really don't want to change it unless I have to.
going round in circles on this :(...
Have you tried specifically setting the database to not remote backup?
var db = Ti.Database.open('dbname'); db.file.setRemoteBackup(false);I believe you can do the same for specific files.
Is this what you have in your app.js?
Ti.Filesystem.remoteBackup = false; Ti.Database.remoteBackup = false;If so, that won't do anything. You need to set the property on a specific file or database object itself. You don't set the property at the Filesystem or Database class level. See this answer and its comments.
Thank you.. I had completely miss understood this. Have it now working on the directory and DB ...
fileDir = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory); fileDir.remoteBackup = false;
Has sorted out the saving of the directory and
var db = Ti.Database.open('dbname'); db.file.setRemoteBackup(false);
sorted out the DB.
Think you can help? Login to answer this question!