Basic data and iOS 7: different persistent storage behavior

I am preparing an update for a Core Data-based application for fixes with iOS 7. I am using Xcode 5 and GM iOS 7 SDK. However, I understood another behavior of persistent storage (this is UIManagedDocument ): before the build of iOS 7, there was only one persistentStore file in the document folder (sometimes there was a second persistentStore-journal ).

IOS 7 build (clean install) now has three files for persistent storage:

  • persistentStore
  • persistentStore-wal and
  • persistentStore-shm

By default, Apple changed log mode to WAL? I wonder if there is an effect on my application (think about how users update the latest version)? It would be better to disable WAL - and if so, how can I do this with iOS 7 / UIManagedDocument ?

+65
ios sqlite ios7 core-data uimanageddocument
Sep 18 '13 at 10:57 on
source share
1 answer

Yes, Apple has changed the default log mode to WAL for iOS7. You can specify the log mode by adding NSSQLitePragmasOption to the parameters by calling addPersistentStoreWithType: configuration: url: options: error. For example. to set the previous default DELETE mode:

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

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

iOS CoreData - Are there any flaws to enabling WAL / Write-Ahead logging in sqlite .

+94
Sep 18 '13 at 11:14
source share



All Articles