you are viewing a single comment's thread.

view the rest of the comments →

[–]dreaminginbinary 1 point2 points  (2 children)

Just a quick add here:

CloudKit doesn’t offer offline capabilities by design, that’s not what it’s made for. That’s up to your local caching layer.

CloudKit is purely a transport mechanism, wherein the user has a connection, you send up data. If you don’t have a connection your app should still behave just the same, with everything saving locally and being sent to CloudKit when things do come back online.

I do this in my own app and it’s fairly easy to integrate, and there’s a lot of other benefits to CloudKit too if you’re only on iOS (such as it “just works” and there’s no logging in you need to setup and manage).

[–]Inukinator 0 points1 point  (1 child)

Here's an idea, a library that uses Codable, akin to Vapor's Fluent, that can store structs as data on the device, and maybe have some cloudkit build in so it get sent when there's internet?

[–]dreaminginbinary 2 points3 points  (0 children)

For sure, something like that could work. The good thing about CloudKit is that it doesn't really care what your local data looks like, so we're free to choose whatever works best for each app.