cloudkit
Safe Rust bindings for Apple's CloudKit framework on macOS.
Status: v0.2.0 broadens the bridge from the initial container/database surface to per-area coverage for container, database, record, record ID, zone, subscription, operation, share, notification info, query, fetched results, reference utility, server change token, asset, and user identity APIs. See COVERAGE.md for the audited SDK/header-to-source map.
Quick start
use *;
Highlights
CKContainerdefault/custom containers, account status, user-record lookup, user-identity discovery, and share-participant lookupCKDatabaserecord CRUD, first-batch query helpers, fetched query results, record-zone helpers, and subscription helpers- Value-layer Rust wrappers for
CKRecord,CKRecordID,CKRecordZone,CKAsset,CKReference,CKNotificationInfo,CKServerChangeToken,CKUserIdentity, andCKShare - Operation builders for
CKModifyRecordsOperation,CKQueryOperation,CKFetchRecordsOperation,CKFetchDatabaseChangesOperation, andCKFetchRecordZoneChangesOperation - Headless numbered examples
01–15plus per-area integration tests
Validation
The v0.2.0 bridge is validated with:
for; do ; done
Entitlements / caveats
CloudKit requires an entitled app plus an iCloud account for most server-backed operations.
Unsigned CLI binaries commonly hit CKErrorMissingEntitlement, CKErrorBadContainer, or CKErrorNotAuthenticated. When CKContainer::default() cannot be resolved because the current process has no iCloud container entitlement, the crate surfaces a bridge error instead of letting CloudKit raise an Objective-C exception. Headless tests and examples can therefore report entitlement/account limitations gracefully instead of crashing.
Examples
Run the defensive framework smoke test with:
Other numbered examples cover the expanded logical areas:
02_database_zones_and_subscriptions03_record_value_roundtrip04_record_id_construction05_zone_construction06_subscription_builders07_operation_builders08_share_local_construction09_notification_info_builder10_query_builder11_fetched_results_smoke12_reference_utility13_server_change_token_bytes14_asset_file_url15_user_identity_lookup
License
Licensed under either Apache-2.0 or MIT at your option.