Skip to content

Replace NativeCloudKitService with CloudKit framework in MistDemoApp #328

Description

@leogdion

Context

MistDemoApp (Examples/MistDemo/Sources/MistDemoApp) currently routes its CloudKit operations through NativeCloudKitService, which is built on top of MistKit's REST-based CloudKitService. On Apple platforms, applications should use the CloudKit framework (import CloudKit, CKContainer, CKDatabase) directly — MistKit's value lives in server/Linux/WASI/Windows contexts where the CloudKit framework is unavailable.

Why

  • Honest pitch: the right tool for the platform. The native example shouldn't double as a MistKit demo when CloudKit framework is the natural choice on iOS/macOS.
  • Removes a confusing signal — users browsing the example shouldn't conclude that MistKit is the recommended way to talk to CloudKit from a SwiftUI app.
  • Simplifies auth in the app: signed-in iCloud user, no token plumbing. The public/private database picker becomes container.publicCloudDatabase vs container.privateCloudDatabase, which absorbs the app side of Add public database interface to MistDemoApp and web #275.

What

  • Replace (or rewrite) NativeCloudKitService with a CloudKit-framework-based service using CKContainer (default or the container ID configured in entitlements), CKDatabase, CKRecord, CKQuery, CKQueryOperation, etc.
  • Wire the SwiftUI views to the new service.
  • Drop the auth-token UI from the app (no longer applicable on Apple platforms).
  • Implement the public/private database selector in SwiftUI (absorbs the app half of Add public database interface to MistDemoApp and web #275).
  • Confirm the app's Package.swift no longer depends on MistKit.

Out of scope

  • Web demo and CLI continue to use MistKit; this issue only affects MistDemoApp.
  • MistKit-on-Apple coverage continues via the package's own test target.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions