LogoAwesome Skills
  • Search
  • Category
  • Tag
  • Blog
LogoAwesome Skills
LogoAwesome Skills

Discover Open-Source Agent Skills for AI Coding Assistants

Product

  • Search
  • Category
  • Tag
  • Blog

Resources

  • Claude Skill Docs
  • Antigravity Skills Docs

Tools

  • Claude Code
  • OpenCode
  • Cursor
  • Codex
  • Antigravity

Company

  • Privacy Policy
  • Terms of Service
  • Sitemap

©2026 Awesome Skills. All rights reserved.

Privacy PolicyTerms
Back to Skills

cloudkit

Implement, review, or improve CloudKit and iCloud sync in iOS/macOS apps. Use when working with CKContainer, CKRecord, CKQuery, CKSubscription, CKSyncEngine, CKShare, NSUbiquitousKeyValueStore, or iCloud Drive file coordination; when syncing SwiftData models via ModelConfiguration with cloudKitDatabase; when handling CKError codes for conflict resolution, network failures, or quota limits; or when checking iCloud account status before performing sync operations.

832stars43forksUpdated 7/5/2026
Developer Tools#ios#data-sync#cloudkit#macos#swift#icloud

Security Assessment

Low Risk(70/100)

Detected risks:

Secret Exposure([references/cloudkit-patterns.md] Token =)
Security Score70/100

About cloudkit

A practical reference for implementing, reviewing, or improving CloudKit and iCloud sync in iOS and macOS apps, targeting iOS 26+ with Swift 6.3 while noting older availability where relevant. It starts with container and database setup, enabling iCloud + CloudKit capabilities and understanding the three databases a container exposes (public, private, shared) with their differing iCloud requirements and storage quotas, then covers CKRecord CRUD with the 1 MB per-record limit, custom record zones (which support atomic commits, change tracking, and sharing, unlike public databases), and CKQuery with its supported NSPredicate operators and encryption caveats.

Later sections address CKSubscription (query, database, and record-zone subscriptions plus silent-push handling in the app delegate) and CKSyncEngine (iOS 17+), described as the recommended sync approach for custom model data because it manages scheduling, retries, change tokens, and database subscriptions, while still leaving app-specific conflicts like CKError.serverRecordChanged to custom resolution. It also integrates SwiftData with CloudKit via ModelConfiguration, and covers NSUbiquitousKeyValueStore, iCloud Drive file coordination, account-status checks, error handling, and conflict resolution.

Use it when working with any of these CloudKit types, when handling CKError codes for conflict resolution, network failures, or quota limits, or before performing sync that depends on iCloud account status. The skill is structured as a contents-linked guide with concrete Swift examples throughout and rounds out with a common-mistakes section and a review checklist, making it suitable both for writing new sync code and for auditing existing integrations. Notable details include encryption eligibility rules: encrypted values cannot be queried or sorted, CKAsset is encrypted by default, and CKRecord.Reference cannot be encrypted because CloudKit needs it server-side.

FAQ

What iOS and Swift versions does it target?

iOS 26+ with Swift 6.3, with older availability noted where relevant; for example CKSyncEngine requires iOS 17+.

When should I use CKSyncEngine?

It is the recommended approach for syncing custom model data because it handles scheduling, retries, change tokens, and database subscriptions, though you still resolve app-specific conflicts like CKError.serverRecordChanged yourself.

What are the three CloudKit databases?

Public (all users, app quota), Private (current user, user quota), and Shared (shared records, owner quota); private and shared require an iCloud account.

Can I query or sort on encrypted fields?

No; encrypted values cannot be queried or sorted, CKAsset is encrypted by default, and CKRecord.Reference cannot be encrypted because CloudKit needs it server-side.

Does it cover SwiftData integration?

Yes; it includes syncing SwiftData models via ModelConfiguration with a cloudKitDatabase, alongside CKRecord CRUD, subscriptions, and CKSyncEngine.

All Files

3 files
evals/evals.json3.6 KB
View
SKILL.md18.7 KB
View
references/cloudkit-patterns.md14.6 KB
View

Install cloudkit

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill

Repository

dpearson2699/swift-ios-skills

Related Skills

research

448

secops-detection-engineering

21,346

qdrant-monitoring

259

project-architecture

3