CloudKit Support & Extending SwiftData Apps

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now

This module will examine syncing SwiftData with CloudKit. These two frameworks now work seamlessly together. Adding CloudKit makes for a compelling user experience, as the data and states can be synced between their devices.

Once a few prerequisites are met, setting up Cloudkit requires only a few steps. You’ll need an Apple developer account and a development team. Your users will log in with their Apple ID, and the data will sync automatically.

After setting up CloudKit, you’ll revisit the macOS version of the app and update the image support.

In this lesson, you’ll learn:

  • How easy it is to share your records between your iPhone, iPad, Vision Pro, and your Mac.
  • How to handle large data tasks. This can be done by employing Swift Concurrency with async/await. SwiftData adds to the efficiencies with the new ModelActor, which is tuned for SwiftData tasks and protections to ensure fast and safe transactions.

Now, continue to the next section for some backing theory.

See forum comments
Download course materials from Github
Previous: Lesson 3: SwiftData Techniques Quiz Next: CloudKit Support & Extending SwiftData Apps Introduction