- Add OAuth 2.0 PKCE authentication for Spotify Web API - Create SpotifyNowPlayingMonitor for polling current track - Add Settings tab with music source toggle (Apple Music/Spotify) - Store tokens securely in Keychain - Display current track on Glass as NOW_PLAYING card 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
41 lines
1.1 KiB
Swift
41 lines
1.1 KiB
Swift
//
|
|
// ContentView.swift
|
|
// iris
|
|
//
|
|
// Created by Kenneth on 06/01/2026.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
struct ContentView: View {
|
|
@EnvironmentObject private var orchestrator: ContextOrchestrator
|
|
|
|
var body: some View {
|
|
TabView {
|
|
BleStatusView()
|
|
.tabItem { Label("BLE", systemImage: "dot.radiowaves.left.and.right") }
|
|
OrchestratorView()
|
|
.tabItem { Label("Orchestrator", systemImage: "bolt.horizontal.circle") }
|
|
SettingsView()
|
|
.tabItem { Label("Settings", systemImage: "gearshape") }
|
|
}
|
|
.onAppear { orchestrator.start() }
|
|
}
|
|
}
|
|
|
|
struct ContentView_Previews: PreviewProvider {
|
|
static var previews: some View {
|
|
if #available(iOS 16.0, *) {
|
|
let ble = BlePeripheralManager()
|
|
let spotifyAuth = SpotifyAuthManager()
|
|
let orchestrator = ContextOrchestrator(ble: ble, spotifyAuth: spotifyAuth)
|
|
ContentView()
|
|
.environmentObject(ble)
|
|
.environmentObject(orchestrator)
|
|
.environmentObject(spotifyAuth)
|
|
} else {
|
|
ContentView()
|
|
}
|
|
}
|
|
}
|