UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

SOLVED: Cloud Kit and Storing Data

Forums > iOS

I want to build an app that uses Cloud Kit to sync data between a users devices. Do I also have to use CoreData to store the data? Or is having it on the cloud enough?

3      

You can use just CloudKit but in case user is offline they wont see anything. So you would likely need some sort of caching mechanism.

With Core Data you could try

https://developer.apple.com/wwdc19/202

Looks like you could just slightly modify how Core Data is set up to get iCloud sync "for free" but I havent tried it yet and dunno how seamless this is.

4      

You can look at Integrating CloudKit with Core Date in SwiftUI to share data across devices.

If you want to do in SwiftUI

5      

The Apple WWDC talk about CloudKit and CoreData is super advanced. I could not understand much of it.

If you are starting out the second link by @NigelGee pointing to the SchwiftyUI video is quite good, and it doesnt matter if it is SwiftUI because CloudKit is still a separate framework, so it will be kinda of same to connect to the APIs.

4      

Thank you!

3      

Hacking with Swift is sponsored by Essential Developer

SPONSORED Join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer! Hurry up because it'll be available only until April 28th.

Click to save your free spot now

Sponsor Hacking with Swift and reach the world's largest Swift community!

Archived topic

This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.