Master Data Encryption

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??

+4
source share
1 answer

Just in case anyone is interested, I understood why I foolishly thought that the encryption provided by the apple, as mentioned in my question, did not work. I turned on encryption in my CoreData file and, to verify, I was just trying to capture the .sqlLite file from my device using iExplorer. It seems to be accessing the file because the .sqlLite file is opening using my sqlLite browser. However, he did not actually open the last file from the device, but instead opened the cached version of the file ...

+3
source

All Articles