Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Titanium - Updated SQLite database is lost when the app is killed

$
0
0

For my application I make use of a basic SQLite database which is packaged with the app itself. That is a trimmed down version of the complete database, to reduce the download and reduce the startup time.

When the application is opened, it checks for an update on a server, and then receives the rest of the database + some images. The local database is then updated with the received data using several INSERT statements (surrounded by "BEGIN" and "COMMIT" statements).

What I notice is that when I manually kill the app (double tap the home button, long press on the app, press the 'minus' badge) and restart the app again, the database is restored to the initial database packaged with the initial application. All the updates are lost and have to be downloaded again.

Is there a way to save the database data persistently, is it Apple policy that SQL data can always be removed to save space, or am I doing something wrong?


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>