From what I understand, to enable data encryption for Core Data the device needed to enable/turn on Passcode and included this key in the optional dictionary for the addPersistentStoreWithType: method. I did enable Passcode for my device and this code in the project:
NSPersistentStore *store = [self.managedObjectContext.persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType
configuration:nil
URL:self.storeURL
options:@{ NSPersistentStoreUbiquitousContentNameKey : @"iCloudStore",
NSPersistentStoreFileProtectionKey : NSFileProtectionComplete}
error:&error];
But when I opened the sqlite data file directly using a software called Liya (downloaded from Mac app store), I was able to see the data in the sqlite database. I saved the sqlite database file from my device to my Mac using iTunes filesharing.
Since data were encrypted, should I not be able to see data directly using tools such as Liya at all?