I've read many threads about sqlite database and how to update with wal and checkpoint but I really do not understand despite all the information on Internet.
I merge two sqlite databases on a Desktop computer with a Python script but when I put the new file (store.data) back to the folder in Xcode and replace the old one the app crashes at running (error 259). I think this happens because the original wal/shm file does not recognize the new database (which has now new information/columns/rows) but I cannot figure out how I can create new wal/shm from this file. Or should I modify those ones at the same time I merge databases?
EDIT: it works fine when I execute the PRAGMA wal_checkpoint(RESTART) in sqlite browser app... I replace the old files in my Xcode folder but it only works if I make a new rebuild and not if I just open it in the simulator... This will not cause a problem on a real device since I will not rebuild the app but just launch it? Is there a way to get round of it?