Disable backup of documents folder and all its sub folders on icloud?

后端 未结 4 983
离开以前
离开以前 2020-12-19 09:55

I have an already running enterprise application which stores a lot of documents inside the documents folders. I wish to disable the iCloud backup of all these documents and

4条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-19 10:49

    You can put kCFURLIsExcludedFromBackupKey (or NSURLIsExcludedFromBackupKey) to the entire Documents directory just like you would for a single file. However, if you don't want any of the files backed up, you may want to rethink where they should go. The Documents directory is for user data only. If files are stored on your own servers, they should probably go in Caches because they can be downloaded again easily. If the files are only needed for a short period of time, they should go in tmp/.

    This is Apple's documentation about where to put your app's files.

提交回复
热议问题