I'm developing SipBudget, an iPhone app that will store manually entered alcohol-consumption records locally using SwiftData.
The app will not use CloudKit synchronization, HealthKit, or a developer-operated cloud database.
I understand that App Review Guideline 5.1.3(ii) prohibits storing personal health information in iCloud.
I would appreciate technical guidance on two questions:
Can a local SwiftData database be reliably excluded from ordinary iCloud device backups?
If so, what is Apple's recommended implementation for ensuring that the database and related files remain excluded, including after database updates or migrations?
I'm asking before implementation so I can design the storage architecture correctly.
Thank you.
Yes, you can put your SwiftData in a folder and then exclude the folder from iCloud backup. See Mark Nonpurgeable Data as Excludable for how to do that.
To specify a URL for a SwiftData store, creating a model configuration (ModelConfiguration) with the URL, and use the configuration to create y our model container (ModelContainer).
Best,
——
Ziqiao Chen
Worldwide Developer Relations.