On 23 Apr 2015, at 9:29pm, Jeff M <jmat at mac.com> wrote: > Has there been any discussion about integrating sqlite with Apple's iCloud, > either by using Apple's Core Data as the Virtual Machine's database engine > (so the VM would operate on Core Data objects) or by otherwise modifying the > existing backend?
Apple has already tightly integrated SQLite with iCloud. You can read about it here: <https://developer.apple.com/library/ios/documentation/DataManagement/Conceptual/UsingCoreDataWithiCloudPG/UsingSQLiteStoragewithiCloud/UsingSQLiteStoragewithiCloud.html#//apple_ref/doc/uid/TP40013491-CH3> This follows the standard Core Data model: the database is used to store persistent objects and your API handles objects rather than making SQLite calls. You might instead be asking whether you could write an app which makes SQLite calls to have data stores in iCloud. This could be done by writing a SQLite VFS which stored data in iCloud. I don't know how well this would work, especially if more than one user was trying to use a database. It might be difficult to implement because the iCloud API doesn't map neatly onto the SQLite VFS API. But this is far more detailed than I have ever learned to program myself. What would be easier is to use SQLite to store a database on your iCloud Drive, as available in OS X 10.10 and above and some versions of Windows. But there's nothing to do here: the drive is just a mounted volume like a Flash drive or an AFP mount. Just use the right path in sqlite3_open(). And experiment with concurrent multi-user use before you promise it, since iCloud Drive locking is, I think, implemented with using SMB2. Simon.