How can I prevent backup for user data in flutter for iOS app?

677

These folders are backed up to iCloud:

  • <AppHome>/Documents
  • <AppHome>/Library/Application Support
  • <AppHome>/Library/YourDir

iCloud Backup does not copy these temp folders but your data would need to be recreatable:

  • <AppHome>/Library/Caches
  • <AppHome>/tmp

Otherwise you will need to write some native code and use isExcludedFromBackupKey, see https://developer.apple.com/icloud/documentation/data-storage/

Share:
677
Merijn Mestdagh
Author by

Merijn Mestdagh

Updated on December 17, 2022

Comments

  • Merijn Mestdagh
    Merijn Mestdagh over 1 year

    The data storage and privacy requirements for the mobile application security verification standard states that 'No sensitive data is included in backups generated by the mobile operating system.'

    How do I make sure data is not backed up in my flutter app?

    For Android I put

        android:allowBackup="false"
        android:fullBackupContent="false"
    

    In AndroidManifest.xml. How can I fix this for iOS?

    Thanks!