2

I am trying study the Data Protection Process on iPhone Simulator, but i am failing at the initial step.I created a DB File and added it to the Application Resources. During the Application Launch i copy this file to the Application Folder.

Then i do this:

NSDictionary *fileAttributes = [NSDictionary dictionaryWithObject:NSFileProtectionComplete forKey:NSFileProtectionKey];

if (![[NSFileManager defaultManager] setAttributes:fileAttributes ofItemAtPath:appDBPath error:&error]) {
        //handle error
    }

But when i check the file attributes after this, i do not get the key NSFileProtectionKey

Am i missing something obvious in it? Do we have to add any Framework for Data Protection?

Or is it that this can only be tested on the device?

I need to get it done quickly.. Please help me guys :(

Vin
  • 10,517
  • 10
  • 58
  • 71
JohnS
  • 21
  • 2

0 Answers0