Question

I have an app that allows the user to save content to the app which, if they backup to iCloud, will save that content to the iCloud backup. I just released a new version and wanted to clear out all the old data so I deleted it expecting that it would also be removed from user's iCloud backups of the app as well.

That is not the case.

I'm looking at a device right now that has several GB of content backed up to iCloud from the previous version of the app and despite several manual backups that content is still sitting in the iCloud backup of the app even though there is no data in the actual app anymore.

How do you purge your app's iCloud backup?

Was it helpful?

Solution

How do you purge your app's iCloud backup?

You don't.

First: The only API that has any effect on backups is that you may exclude files from backups. Aside from that, your app has absolutely no influence over the process.

Second: iCloud will maintain more than one backup. When restoring a device from iCloud, a person can choose which of the existing backups they want. As a result, manually forcing backups in Settings does not necessarily clear out old data from previous backups. This is the whole point of these backups, or at least one of the major priorities of the system: that it's possible to restore data that's been deleted. Third party apps don't get to participate in the algorithm that decides which backups to keep.

If your app takes up a lot less space than it used to, then eventually the old data will disappear from people's backups. When that happens is undocumented.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top