Syncing a local sqlite file to iCloud

后端 未结 3 1224
北海茫月
北海茫月 2021-02-04 02:53

I store some data in my iOS app directly in a local .sqlite file.  I chose to do this instead of CoreData because the data will need to be compatible with non-Apple platforms.

3条回答
  •  后悔当初
    2021-02-04 03:45

    I've considered the possibility of transferring a database file through iCloud but I think that I would run into classic problems of timing - slow start for the user - and corrupted databases if the app is run on multiple devices simultaneously. (iPad/iPhone for example).

    Sooo. I've had to use the transaction logs method. It really is difficult to implement, but once in place, seems ok.

    I am using Apple's SharedCoreData sample as the base for this work. This link requires an Apple Developer Account.

    I did find a much much better solution from Tim Roadley however this only works for IOS and I needed both IOS and MacOS.

    rant> iCloud development really has to get easier and more stable! /rant

提交回复
热议问题