I am trying to encrypt my master data.
As suggested in another question, I read the following post from Nick Harris https://nickharris.wordpress.com/2010/07/14/core-data-and-enterprise-iphone-applications-protecting-your-data/ .
Firstly, on my device, I turned on my passcode in the settings.
Then, in my appDelegate application, when I create my persistentStoreCoordinator, I add the following NSFileProtectionComplete attribute to my main data store file, which, as I understand it, will mean that when the device is locked, my main data should be encrypted or inaccessible.
NSDictionary *fileAttributes = [NSDictionary dictionaryWithObject:NSFileProtectionComplete forKey:NSFileProtectionKey]; if (![[NSFileManager defaultManager] setAttributes:fileAttributes ofItemAtPath:[storeURL path] error:&error]) { NSLog(@"Cant encrypt"); }
However, having done all this, even with a locked access code for the device, I can still access the application sandbox and the document folder containing the .sqllite file using iExplorer, and I can take the entire file to my desktop and fully view it in unencrypted.
Did I miss something??
source share