cloudkit-sync
cloudkit-sync equips you with Claude Code expertise for integrating iCloud synchronization into iOS and macOS applications using current CloudKit patterns. This skill guides you through designing robust cloud persistence layers, managing data consistency, and leveraging Apple's native sync framework to keep user data seamlessly updated across devices.
cloudkit-sync helps you integrate iCloud synchronization by guiding you through modern CloudKit infrastructure setup. You'll learn to configure CloudKit containers, set up CKSyncEngine for automatic sync management, and implement proper entitlements. The skill provides patterns for connecting your local data models to CloudKit records, handling account status changes, and managing sync state across devices—all essential for seamless iCloud integration in iOS applications.
AI-generated summary based on this skill's SKILL.md
Install
rshankras/claude-code-apple-skills/cloudkit-sync · repository language: Swift
git clone https://github.com/rshankras/claude-code-apple-skills
cp -r claude-code-apple-skills/skills/generators/cloudkit-sync ~/.claude/skills/cloudkit-syncFrequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
How do I add iCloud sync to my iOS app?
cloudkit-sync helps you integrate iCloud synchronization by guiding you through modern CloudKit infrastructure setup. You'll learn to configure CloudKit containers, set up CKSyncEngine for automatic sync management, and implement proper entitlements. The skill provides patterns for connecting your local data models to CloudKit records, handling account status changes, and managing sync state across devices—all essential for seamless iCloud integration in iOS applications.
What does cloudkit-sync provide for conflict resolution?
cloudkit-sync equips you with strategies for production-ready conflict resolution in cloud sync scenarios. The skill covers implementing CKSyncEngine delegates to handle competing changes, designing version-aware data models, and applying merge logic that preserves user intent. You'll learn best practices for detecting conflicts between local and remote changes, resolving them deterministically, and maintaining data consistency across your iOS and macOS apps.
Can cloudkit-sync help sync data between iPhone and Mac?
Yes—cloudkit-sync specializes in multi-device data synchronization across Apple platforms. The skill guides you through configuring shared CloudKit containers, implementing CKSyncEngine on both iOS and macOS, and managing sync state across devices. You'll learn how to map your SwiftData models to CKRecords, handle offline scenarios, and ensure that changes on one device propagate reliably to others while respecting user privacy and account status.
How do I implement CloudKit sharing for collaborative data?
cloudkit-sync covers implementing CloudKit sharing using CKShare and modern sync patterns. The skill teaches you to set up share zones, configure sharing permissions, and manage collaborative access between users. You'll learn delegate implementation for handling share invitations, monitoring shared record changes, and maintaining consistency in collaborative scenarios—enabling your iOS and macOS apps to support true multi-user data synchronization.
What iCloud sync infrastructure does cloudkit-sync cover?
cloudkit-sync addresses current CloudKit infrastructure patterns for iOS 17 and beyond. The skill covers CKSyncEngine setup and best practices, container configuration, entitlements management, and migration strategies from older CKOperation-based approaches. You'll learn offline sync handling, account monitoring, and how to generate production-ready boilerplate code—providing a complete foundation for modern iCloud persistence in your Apple platform applications.
Does cloudkit-sync help with CKRecord mapping to SwiftData?
cloudkit-sync provides guidance on mapping CKRecords to SwiftData models, a key pattern for modern iOS development. The skill teaches you to design bidirectional sync between your local SwiftData persistence layer and CloudKit, handle type conversions, and maintain model consistency. You'll learn techniques for structuring your models to work efficiently with both local and cloud storage, enabling seamless data flow across your app's architecture.
SKILL.md
rendered from the published skill — quoted content, verbatim
CloudKit Sync Generator
Generate production-ready CloudKit sync infrastructure using CKSyncEngine (iOS 17+ / macOS 14+), the modern replacement for manual CKOperation chains.
When This Skill Activates
Use this skill when the user: - Asks to "add iCloud sync" or "sync data across devices" - Mentions "CloudKit", "CKSyncEngine", or "cloud sync" - Wants to "share data between users" via iCloud - Asks about "conflict resolution" for synced data - Mentions "CKRecord", "CKShare", or "CKRecordZone"
Pre-Generation Checks
1. Project Context Detection
Before generating, ALWAYS check:
```bash
Check deployment target (CKSyncEngine requires iOS 17+ / macOS 14+)
grep -r "platform" Package.swift 2>/dev/null || true grep -r "IPHONEOS_DEPLOYMENT_TARGET|MACOSX_DEPLOYMENT_TARGET" --include="*.pbxproj" | head -3
Find
(truncated - see the full file via the links below)
Read as markdown · JSON record · Browse the source repository
File tree — 2 files
skills/generators/cloudkit-sync/SKILL.md
skills/generators/cloudkit-sync/templates.md