Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude downloaded audio from iCloud Backup #675

Open
suhailskhan opened this issue Oct 24, 2024 · 2 comments
Open

Exclude downloaded audio from iCloud Backup #675

suhailskhan opened this issue Oct 24, 2024 · 2 comments

Comments

@suhailskhan
Copy link

suhailskhan commented Oct 24, 2024

When iCloud Backup is enabled on a device, the backup it creates will include recitation/translation audio downloaded by the application, causing the device’s backup size to be significantly higher than it would have been without the audio data. Currently, the only way to mitigate this is to turn off backup of the app’s data entirely, in iCloud Backup’s Details screen, as pictured below.

Since this data is reproducible (i.e. by tapping the “download” button), this does not need to be part of a device’s backup. While we can simply apply the workaround described earlier, which is to turn off backup of the app’s data, ideally the app itself should prevent audio from being part of backups. Users that want to back their device up to iCloud but are mindful of iCloud storage consumption should not have to manually exclude the app from their device’s backup. Preventing audio from being backed up will also greatly reduce redundant network traffic as significantly less data will be uploaded by the system by default. (It is also worth noting that iCloud Backup is enabled by default on devices signed into iCloud.) Also, doing this will reduce the time it takes for a new device to finish restoring from iCloud on slower internet connections.

Foundation provides a way to mark certain files or directories created by our application as excludable from iCloud Backup, so that all data, except for that which is marked as excluded, will be included in device backups (see article “Optimizing Your App’s Data for iCloud Backup” at developer.apple.com). Quran recitation/translation audio most closely fits the article’s description of “non-purgeable” data. To prevent backing up non-purgeable data, it advises applying the isExcludedFromBackup resource value to the URL of a given file or directory. Assuming this is applicable to this application and the way it stores audio files, this may be a solution to the problem.

Screenshot of iCloud Backup details of an iPhone, highlighting the large size of the app’s backup data

@wedkemail
Copy link

I'll look into this! Thanks for the information

@suhailskhan
Copy link
Author

Do keep me updated. I would have liked to look into this myself, but have refrained due to shortage of time at this moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants