Core Data and iOS 7: Different behavior of persistent store Core Data and iOS 7: Different behavior of persistent store ios ios

Core Data and iOS 7: Different behavior of persistent store


Yes, Apple have changed the default journal mode to WAL for iOS7.You can specify the journal mode by adding the NSSQLitePragmasOption to the options when calling addPersistentStoreWithType:configuration:url:options:error. E.g. to set the previous default mode of DELETE:

NSDictionary *options = @{ NSSQLitePragmasOption : @{@"journal_mode" : @"DELETE"} };

In my experience WAL gives better performance, but also see this post:

iOS CoreData - are there any disadvantages to enabling sqlite WAL / Write-Ahead Logging