OpenMeKit — Swift (Apple Platforms)
Keywords
openme iOS, openme macOS, openme watchOS, Swift SPA, OpenMeKit Swift, single packet authentication Swift, knockService Swift
OpenMeKit is the official Swift package for integrating the openme Single Packet Authentication protocol into Apple platform apps.
- Source:
apple/OpenMeKit/in the openme repository - Distribution: Swift Package Manager (SPM)
- Platforms: iOS 16+, macOS 13+, watchOS 9+
Features
| Capability | Details |
|---|---|
| SPA knock | Ed25519 + X25519 ECDH + HKDF-SHA256 + ChaCha20-Poly1305 over UDP via NWConnection |
| Profile management | ClientConfig (Codable) + ProfileStore (app-local persistence) |
| YAML import | Parses openme add output |
| QR import | Parses the JSON payload from openme qr |
| DocC documentation | Full symbol documentation generated with DocC |
Installation
Add the package via Swift Package Manager. In Xcode:
- File → Add Package Dependencies…
- Enter the repository URL:
https://github.com/merlos/openme - Set the dependency rule to Up to Next Major Version from
1.0.0 - Select the OpenMeKit library target
Or add it to your Package.swift:
dependencies: [
.package(url: "https://github.com/merlos/openme", from: "1.0.0")
],
targets: [
.target(name: "MyApp", dependencies: [
.product(name: "OpenMeKit", package: "openme")
])
]Quick Start
import OpenMeKit
// Load a profile (from your app's ProfileStore)
let config = ClientConfig(
serverHost: "myserver.example.com",
serverUDPPort: 54154,
serverPubKey: Data(base64Encoded: "...")!,
privateKey: Data(base64Encoded: "...")!
)
// Send a knock
Task {
do {
try await KnockService.knock(config: config)
print("Knocked successfully")
} catch {
print("Knock failed: \(error)")
}
}Apps Using OpenMeKit
| App | Platform | Description |
|---|---|---|
| openme for iOS | iOS 16+ | Native SwiftUI app — profile list, QR scan, knock button |
| openme for macOS | macOS 13+ | Menu-bar app — one-click knock from the status bar |
| openme for watchOS | watchOS 9+ | Complication + glance — knock from your wrist |
| openme Widget | iOS / macOS | WidgetKit home-screen widget |
DocC Reference
The full DocC API reference is generated from source and published with each release of the documentation site:
→ OpenMeKit Swift API Reference
To generate locally:
cd apple/OpenMeKit
swift package generate-documentation --target OpenMeKitOr open directly in Xcode: Product → Build Documentation while OpenMeKit is selected as the scheme.