Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MKKit

Shared Swift package for code consumed by both zoo-tv (tvOS) and zoo-tv-ios (iOS).

In MKKit

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 with Keychain.configure(service:keyPrefix:).
  • AppStateObservableObject driving 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, optional profileId query 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, Theme color tokens, AppBackground view.
  • FocusGlowButton (tvOS) + TouchScaleButton (iOS) intentionally stay in each app — platform-idiomatic UI, not shared logic.

Usage

Add as an SPM dependency:

// project.yml (xcodegen)
packages:
  MKKit:
    url: https://github.com/JdCpuWiz/MKKit
    from: 0.1.0

targets:
  YourApp:
    dependencies:
      - package: MKKit

Then 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.

Platforms

  • iOS 17+
  • tvOS 17+

About

Shared Swift package for zoo-tv (tvOS) and zoo-tv-ios (iOS)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages