Is the sqlite database backed up to iCloud?

in iOS 12, the default behaviour of Core Data is to create a sqlite database in Library/Application Support. The iOS Data Storage Guidelines tell us which direcotories are saved when a device is backed up or synced to iTunes, but it is silient about the Library and Library/Application Support folders.


https://developer.apple.com/icloud/documentation/data-storage/index.html


"1. Only documents and other data that is user-generated, or that cannot otherwise be recreated by your application, should be stored in the <Application_Home>/Documents directory and will be automatically backed up by iCloud."


I'm storing user-generated content using Core Data and the default persistent store, SQLite. Do I need to do something to ensure the database is automatically backed up by iCloud? I hope that includes iTunes syncing/backup by wire too.

Replies

Yes, the Library/ folder is backed up, excluding Library/Caches.

The forsaken docs are more explicit about which directories are backed up: https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/FileSystemProgrammingGuide/FileSystemOverview/FileSystemOverview.html#//apple_ref/doc/uid/TP40010672-CH2-SW4