Insecure Storage: Lacking Data Protection

The following file was written to disk with a NSFileProtectionKey value of NSFileProtectionNone
  • /var/mobile/Containers/Data/Application/49X9B9C6-XXXX-483B-8C04-1714CA6AC914/Library/SyncedPreferences/<appidentifier>.plist

The following files were written to disk with a NSFileProtectionKey value of NSFileProtectionCompleteUntilFirstUserAuthentication
/var/mobile/Containers/Data/Application/49X9B9C6-XXXX-483B-8C04-1714CA6AC914/Library/Caches/<appIdentifier>/Cache.db
/var/mobile/Containers/Data/Application/49X9B9C6-XXXX-483B-8C04-1714CA6AC914/Library/Saved Application State/<appIdentifier>.savedState/KnownSceneSessions/data.dataThe following files were written to disk with a NSFileProtectionKey value of NSFileProtectionCompleteUnlessOpen
/var/mobile/Containers/Data/Application/49X9B9C6-XXXX-483B-8C04-1714CA6AC914/Library/SplashBoard/Snapshots/sceneID:<appIdentifier>-default/downscaled/547E04C7-D0A2-XXXX-8E04-39654D5EBE46@2x.ktx_
Have any solution to enable NSFileProtectionComplete?

Have any solution to enable NSFileProtectionComplete?

If you set Data Protection > Complete Protection on your App ID, it may change some of these defaults (you might have to delete your app and re-install it). If not, your only real option here is to file a bug requesting that Apple change this. It’s not safe to go modifying files that you didn’t create.

Please post your bug number, just for the record.

Finally, be aware that increasing the Data Protection on your App ID is tricky if your app ever executes in the background because you have to guarantee that your code never touches a protected file

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
Hi eskimo,

Thanks for the info even if we enabled "Data protection" entitlement, there is no change in the file protection key. Are there any documentation to check how iOS handling file protection.

We are using following tools/framework
Xcode Version 11.6
React-native 0.62.2

Thanks,
Naresh.

Are there any documentation to check how iOS handling file protection.

I’m not sure what you’re looking for here. Are you asking whether there’s a detailed specification as to the expected file protection of every file that the system frameworks might create inside your container? If so, the answer is “No.”

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
Hi eskimo, Thanks for the info, and we are currently looking for how to enable "NSFileProtectionComplete" irrespective of apple/iOS default protection.
Because even if we enables Data protection entitlement, the above listed files still having the same protection key.

Let me know if we are missing any.


Thanks,
Naresh.

Insecure Storage: Lacking Data Protection
 
 
Q