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      

TAKE YOUR SKILLS TO THE NEXT LEVEL If you like Hacking with Swift, you'll love Hacking with Swift+ – it's my premium service where you can learn advanced Swift and SwiftUI, functional programming, algorithms, and more. Plus it comes with stacks of benefits, including monthly live streams, downloadable projects, a 20% discount on all books, and free gifts!

Find out more

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.