Search code examples
sqliteicloud

How enable iCloud support for sqlite?


I want to provide iCloud support for my wrapper around sqlite. Is not using coredata.

I wonder how enable iCloud for it. The database content is changed all the time (is for invoicing). Also, if is possible to have some kind of versioning will be great.

Exist any sample I can use to do this?


Solution

  • The short answer is no, you would need to use Core Data as you suspected. Apple has stated that sqlite is unsupported.

    Edit: Check out the section on iCloud that's now in the iOS Application Programming Guide under Using iCloud in Conjunction with Databases

    Using iCloud with a SQLite database is possible only if your app uses Core Data to manage that database. Accessing live database files in iCloud using the SQLite interfaces is not supported and will likely corrupt your database. However, you can create a Core Data store based on SQLite as long as you follow a few extra steps when setting up your Core Data structures. You can also continue to use other types of Core Data stores—that is, stores not based on SQLite—without any special modifications.