Mark the iOS app content not to be backed up when doing unencrypted backup in iTunes

Hi,


is there an option to mark the file or folder or item stored in user defaults ... not to be backed up when doing unencrypted backup in iTunes?

We are developing iOS app that contains sensitive data. But even if we enable Data Protection for the iOS app it can be backed up on mac unencrypted using iTunes. Is there a way to allow backing up content only if the backup is encrypted?

First up, don’t store security-sensitive data in user defaults (

NSUserDefaults
). That API gives you no control over have far and wide the data can roam. And if the data is small enough to store in user defaults, it’ll fit in the keychain just fine.

With regards files, you have two options:

  • You can exclude the files from the backup.

  • You can encrypt the files and then store the key in the keychain, which gives you control over how far the key can roam.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

File a DMA interoperability request. Apple apps can choose to backup as encrypted only, while third party ones cannot.

Mark the iOS app content not to be backed up when doing unencrypted backup in iTunes
 
 
Q