cloudkit

Implement CloudKit data synchronization across Apple devices with CKRecord and CKSyncEngine.

Updated Apr 19, 2026
One-click install
npx skills add https://github.com/femitz/flyby --skill cloudkit-femitz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cloudkit
Source: https://github.com/femitz/flyby/tree/main/.agents/skills/cloudkit
Command: npx skills add https://github.com/femitz/flyby --skill cloudkit-femitz

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

CloudKit-based data synchronization enables apps to keep user data consistent across Apple devices using iCloud, CKRecord, and related APIs, reducing manual conflict resolution and data drift.

Core Features & Use Cases

  • Container and database setup (Public, Private, Shared) and CRUD operations on records
  • Subscriptions, CKQuery, and CKSyncEngine-based syncing with conflict resolution and error handling
  • SwiftData integration for CloudKit-backed models and optional NSUbiquitousKeyValueStore / iCloud Drive coordination
  • Collaboration through CKShare and sharing workflows

Quick Start

Instantiate a CloudKit-enabled model container and begin syncing with the private database.

Frequently Asked Questions about cloudkit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I sync data across Apple devices using CloudKit?

You can sync data across Apple devices by setting up CKContainer, defining CKRecord schemas, and implementing CKSyncEngine to manage private, public, and shared database operations automatically.

What is the difference between private, public, and shared databases in CloudKit?

CloudKit private databases store individual user data in iCloud, public databases hold shared app data accessible to all users, and shared databases enable collaboration through CKShare workflows for distributed record access.

How do I handle conflict resolution and errors during iCloud synchronization?

Conflict resolution and error handling in iCloud synchronization are managed through CKSyncEngine integration, allowing your Swift app to detect data drift, resolve record conflicts, and check iCloud account status during sync operations.

Can I integrate CloudKit with SwiftData for iCloud-backed models?

Yes, you can integrate CloudKit with SwiftData to create CloudKit-backed models, instantiating a CloudKit-enabled model container to begin syncing with the private database while optionally coordinating with NSUbiquitousKeyValueStore.

How do I set up CKQuery and CKSubscription for CloudKit record changes?

CKQuery and CKSubscription allow you to monitor CloudKit record changes by defining query predicates and subscription triggers, enabling your app to receive push notifications when matching records update across iCloud databases.