CloudyKit
Drop-in replacement for Apple's CloudKit on Linux.
Install / Use
/learn @camdenfullmer/CloudyKitREADME
CloudyKit
CloudyKit is a drop in replacement for Apple's CloudKit on Linux. It uses CloudKit Web Services behind the scenes and has the same API that is used on iOS and macOS.
Installation
Swift Package Manager
CloudyKit is available through Swift Package Manager. To install it, add the dependency to your Package.swift file:
dependencies: [
.package(url: "https://github.com/camdenfullmer/CloudyKit.git", from: "0.1.0"),
],
targets: [
.target(name: "YourTarget", dependencies: ["CloudyKit"]),
]
Configuration
Before you get started using CloudyKit there a few things that need to be set up first.
Server-to-Server Key
First, you must create a Server-to-Server Key that CloudyKit can use to authenticate its requests.
CloudyKitConfig.serverKeyID = "YOUR SERVER KEY ID"
CloudyKitConfig.serverPrivateKey = try CKPrivateKey(path: "eckey.pem")
Environment
CloudyKit allows you to switch between your development and production environments by doing the following:
CloudyKitConfig.environment = .development // Use `.production` for production.
Supported Features
Below is the list of supported and upcoming features for CloudyKit.
- [x] Creating Records
- [x] Saving Records
- [x] Fetching Records
- [x] Querying Records
- [x] Deleting Records
- [x] Uploading Assets
- [ ] All Types (missing Locations, Lists)
- [ ] Private and Shared Databases
- [ ] Operations
- [ ] Errors
- [ ] Fetching Record Changes
API Differences
NSSortDescriptor
NSSortDescriptor on Linux does not offer an initializer with a key String value. Instead, use the typealias SortDescriptor that offers the same API.
let sortDescriptor = SortDescriptor(key: "KEY", ascending: true) // instead of NSSortDescriptor(key: "KEY", ascending: true)
NSPredicate
NSPredicate on Linux does not support an initializer with a predicate format. Instead, use the typealias Predicate that offers the same API.
let predicate = Predicate(format: "ANY favoriteColors = 'red'") // instead of NSPredicate(format: "ANY favoriteColors = 'red'")
Questions
Please open up an issue or reach out to me on Twitter if you have any questions or need help using the library!
Related Skills
node-connect
344.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
99.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
344.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
344.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
