This tutorial told me i need to throw 3 files (in WAL mode) to the bundle.
https://www.appcoda.com/core-data-preload-sqlite-database/
MY app using DELETE WAL mode , only 1 file exist there (.sqlite only).
I just testing and throw just 1 file (.sqlite) to the bundle. Then write method to copy it to App's Document dir. It work :o , the file copied perfectly.
But i still wonder if 1 file mode would crash my app later ?? Should i switch to "3 files" mode (WAL MODE ) instead ???
update ***
Hi thanks alot , i just copied .sqlite file to NSBundle perfectly. But after i copied files from Bundle to Document directory. My PSC cant read the .sqlite (thought the ps added to psc perfectly , checked by [psc persistentStores] . Fetched Data still empty (thought i could see the data exists in .sqlite from DBBrowser) . I have tried this over and over but still nothing work (changing file name / etc ) .
My PSC option is like this . I wonder is this the cause ??? thanks
@{ NSSQLitePragmasOption : @{@"journal_mode":@"DELETE"},
NSInferMappingModelAutomaticallyOption: @YES,
NSMigratePersistentStoresAutomaticallyOption : @YES };