I download SQLite db from the Internet to my iPad app. If I write it to install atomically: YES
, I cannot use it right away because, despite the fact that the file is there, sqlite complains that there are no tables there. If I use atomically = NO
or I delay opening the file for several moments, then I do not have this problem.
I think I could do this by setting atomically = NO
, but again there is some guarantee that the entire file was written to disk immediately after writeToFile: call? So far, my db is not so big, but in the end, plus I do not know how long to wait on other devices.
Apple docs claims that this method returns YES
if the operation succeeds, but obviously does not take into account the βdelayβ in file saving.
Any help is much appreciated!
EDIT: I see that other people have the same problem .
source share