I am working on a messaging app and was wondering if anyone could suggest the best design to use with SQL cipher. Currently, I open and close the database on each update (messages sent and received). I have had a couple of crashes that I cannot reproduce at all times and I am thinking it's because of access to the database from multiple files, not to mention I am using background queues whenever accessing the database.
Just to give you an idea why I am using SQL cipher - I need to store all messages on the device as server will hold no data and I need to back up all messages to iCloud periodically. Thus I thought using SQL cipher could provide secure storage.
I would like to know whether it's better to carry on this way or I should keep a local copy and only update the database before the app changes state.
Any suggestion is very much appreciated. Also I am on the path of learning so please don't vote down and let me edit my question if it doesn't sound clear enough. Thank you so much.
Aucun commentaire:
Enregistrer un commentaire