Shared Swift models for Apple release data: SDKs, simulator runtimes, Xcode and Swift releases, and macOS restore images.
SwoopKit is the vocabulary the Swoop packages share. A writer fills these records from public sources and stores them in a CloudKit public database; a reader maps the stored records back; apps match what's installed on a Mac against them.
- SwoopMistKit writes the records to CloudKit with MistKit.
- SwoopCloudKit reads them with native CloudKit.
- Bushel and Stewed use them to show and match releases.
| Type | What it describes |
|---|---|
SDKVersionRecord |
A platform SDK build shipped with Xcode (iOS, macOS, tvOS, visionOS, watchOS) |
SimulatorRuntimeRecord |
A simulator runtime build from Apple's simulator index, with its ReleaseLabel (Beta N, RC N or Final) |
XcodeVersionRecord |
An Xcode release |
SwiftVersionRecord |
A Swift compiler release |
RestoreImageRecord |
A macOS restore image (IPSW), with hash and URL validation |
DataSourceMetadata |
When a data source was last fetched, and how many records it gave |
ReleaseDataSnapshot |
The SDKVersion, XcodeVersion and SimulatorRuntime records fetched together, with fetchedAt: an app's bundled snapshot or a disk cache's contents |
It depends only on Foundation. Every type is Sendable, the records are Codable, and each record has a stable recordName for its CloudKit record.
- Swift 6.4 (swift-tools-version 6.4, Swift 6 language mode); Xcode 27.2 on Apple platforms
- macOS 12, iOS 18, watchOS 11, tvOS 18, visionOS 2 or Mac Catalyst 18; or Linux
Add SwoopKit to your Package.swift:
dependencies: [
.package(url: "https://github.com/brightdigit/SwoopKit.git", from: "1.0.0-alpha.1")
]and to your target:
.target(
name: "YourTarget",
dependencies: [
.product(name: "SwoopKit", package: "SwoopKit")
]
)import SwoopKit
let runtime = SimulatorRuntimeRecord(
platform: .iOS,
version: "27.2",
buildNumber: "24B114",
releaseLabel: .releaseCandidate(1),
sdkBuildNumbers: ["24B113"]
)
runtime.isPrerelease // true
runtime.recordName // "SimulatorRuntime-iOS-24B114"
// Labels order Beta 1 < … < RC 1 < … < Final.
SimulatorRuntimeRecord.ReleaseLabel("Beta 4")! < .releaseCandidate(1) // trueWrite a ReleaseDataSnapshot with JSONEncoder.iso8601PrettySorted (ISO 8601 dates in whole seconds, pretty-printed, sorted keys) so the file is stable and diffable, and read one with ReleaseDataSnapshot(json:), which uses JSONDecoder.iso8601 and throws a typed DecodingError (JSONDecoder.decodeValue(_:from:)).
Decoding doesn't validate. After ingesting external data, call RestoreImageRecord.validate() or DataSourceMetadata.validate(sourceName:recordTypeName:recordCount:fetchDurationSeconds:).
The DocC catalog is in Sources/SwoopKit/SwoopKit.docc. Swift Package Index hosts the published documentation.
To build it locally (no plugin dependency; unresolved symbol links fail the build):
make docs # .build/docs/SwoopKit.doccarchive
make docs-preview # live previewmise trust && mise install # swift-format, SwiftLint and periphery, pinned in mise.toml
make build
make test
make lint # Scripts/lint.sh: format, swift-format, SwiftLint, build, headers, peripheryCI runs on pull requests only (.github/workflows): Linux (Swift 6.4) and Apple platforms (Xcode 27.2), the DocC build, lint and an unsafeFlags check.
SwoopKit is available under the MIT license. See LICENSE.