2 Replies
      Latest reply on Oct 23, 2019 10:54 AM by Jim Dovey
      ladybug man Level 1 Level 1 (0 points)

        I have used cloudkit for years untill swiftUI came out. I just dont get how to instigate it. Are there any samples of how to use Cloudkit with SwiftUI?

        • Re: Are there any samples of how house CloudKit in SwiftUI?
          KMT Level 9 Level 9 (15,045 points)

          I don't see any Apple samples, if that's what you're asking. Feel free to file a request via the bug reporter/suggestions, being sure to add your report # to your thread for reference, thanks and good luck.

          • Re: Are there any samples of how house CloudKit in SwiftUI?
            Jim Dovey Level 3 Level 3 (150 points)

            “What are you trying to do?”


            If you're looking for ways to bind your CloudKit types into a SwiftUI view's state, look at the ObservableObject protocol and @Published property wrapper from the Combine framework—that's how CoreData's NSManagedObject has been bridged in. Go through Apple's SwiftUI tutorials to learn about state management in SwiftUI; the important takeaway is that SwiftUI views are a function of state, so everything you work with is just the state itself, and SwiftUI will arrange for your views to be updated.


            Combine support for CloudKit sounds like a fun side-project for someone though.