Add Spotify integration with toggleable music source

- 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>
This commit is contained in:
2026-01-10 20:27:37 +00:00
parent c13a4f3247
commit 11ee893367
10 changed files with 875 additions and 6 deletions

View File

@@ -16,6 +16,8 @@ struct ContentView: View {
.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() }
}
@@ -25,10 +27,12 @@ struct ContentView_Previews: PreviewProvider {
static var previews: some View {
if #available(iOS 16.0, *) {
let ble = BlePeripheralManager()
let orchestrator = ContextOrchestrator(ble: ble)
let spotifyAuth = SpotifyAuthManager()
let orchestrator = ContextOrchestrator(ble: ble, spotifyAuth: spotifyAuth)
ContentView()
.environmentObject(ble)
.environmentObject(orchestrator)
.environmentObject(spotifyAuth)
} else {
ContentView()
}