The iOS data protection API and its implementation are fairly well documented, but it is only really useful if apps actually use some level other than NSFileProtectionNone for their files.

Is there any information on what protection level the stock iOS apps use for various data? Apple mentions that the Mail app uses the "Protected Unless Open" class for attachments downloaded in the background and stores and stores messages protected with NSFileProtectionComplete, but says nothing about other data like contacts, photos etc.

What about third-party developers; is there any research on how common the use of data protection is with popular apps? For iOS 7, Apple mentions that "[a]ll third-party apps now have data protection enabled automatically", but I wonder if that applies to "legacy" apps as well, and if some even actively disable the protection.

1 Answer 1


You can check the implemented data protection of any application yourself. on a jailbroken phone use cycript to attach to SpringBoard (or any other process) eg:

cycript -p SpringBoard

and run the following script inside:

A cycript script to list the FileProtection class of every file in a given path


var path=@"/var/mobile/Library/Preferences/";
var fm = [ NSFileManager defaultManager ];
fin = [ fm enumeratorAtPath:path ];
ps= [] ;
while (name=[fin nextObject] )
 pClass=[[ fm attributesOfItemAtPath:fPath error:nil ] objectForKey:@"NSFileProtectionKey" ]

on a 5.1.1 iOS i got these results for Stocks application and for youtube application:


On a 6.1.2 iOS device things didn't look different:


you can try running it on your device and see what has changed on other versions


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.