vendredi 27 mars 2015

Sqlite with (CloudKit or iCloud Drive)

I have an iOS app that timestamps some events and loads them in UI. To persist the data I use CloudKit which is quite fine and fast enough for my use case. I dont need to share the cloudkit on user's different devices. The problem is, when an event occures I save it instantly to cloudkit therefore if internet wouldnt be reachable I have to handle the situation. I had the idea of having a local sqlite db and sort of keep track of connectivity and deal with syncing manually. I found YapDatabase library doing the exact thing and I feel the learning curve of it is a little bit steep.


Another idea could be using sqlite db but saving the file in the icloud drive. This way it will be persisted automatically while I have access to sqlite. Any change in the db tables will change file singnature and fire icloud drive sync.


What's the best choice?


Aucun commentaire:

Enregistrer un commentaire