Shared Swift package for code consumed by both zoo-tv (tvOS) and zoo-tv-ios (iOS).
Phase 1 (v0.1.0, 2026-06-04):
Keychain— wrapper around iOS/tvOS Keychain Services for the device JWT + profile state. Bootstrap once per app withKeychain.configure(service:keyPrefix:).AppState—ObservableObjectdriving the app lifecycle phases (.needsPairing,.needsProfilePick,.ready,.signedOut).Notification.Name.mkDeviceRevoked— broadcast contract for token-revocation auto-recovery.
Phase 2 (v0.2.0, 2026-06-04):
MKClient— Hono / media-kennel networking + auth client. Single base URL (https://media-kennel.deckerzoo.com— Traefik FQDN, resolves to LAN at home and works off-LAN). Adopts the iOS-flavored implementation: fractional-ISO8601 date decoder, optionalprofileIdquery parameter on all library routes,/api/external/library/...stream paths.MKError— typed errors from MKClient.
Phase 3 (v0.3.0, 2026-06-04):
Color(hex:)extension,Themecolor tokens,AppBackgroundview.FocusGlowButton(tvOS) +TouchScaleButton(iOS) intentionally stay in each app — platform-idiomatic UI, not shared logic.
Add as an SPM dependency:
// project.yml (xcodegen)
packages:
MKKit:
url: https://github.com/JdCpuWiz/MKKit
from: 0.1.0
targets:
YourApp:
dependencies:
- package: MKKitThen in @main App.init:
import MKKit
@main
struct ZooTVApp: App {
init() {
Keychain.configure(service: "com.zoo-tv.app", keyPrefix: "zoo-tv")
}
}Per-app config strings keep keychain account scopes distinct so side-by-side installs on the same iPad don't cross-stomp credentials.
- iOS 17+
- tvOS 17+