Add Spotify integration with toggleable music source #3

Closed
chezu wants to merge 0 commits from feat-spotify into main
Collaborator

Summary

  • Add OAuth 2.0 PKCE authentication for Spotify Web API
  • Create SpotifyNowPlayingMonitor for polling current track (every 4 seconds)
  • Add Settings tab with music source toggle (Apple Music / Spotify)
  • Store tokens securely in iOS Keychain
  • Display current Spotify track on Glass as NOW_PLAYING card (Title + Artist + Album)
  • Add in-app UI to configure Spotify Client ID (expandable Configuration section)

New Files

File Purpose
Spotify/KeychainHelper.swift Secure token storage
Spotify/SpotifyModels.swift API response models + MusicSource enum
Spotify/SpotifyAuthManager.swift OAuth 2.0 PKCE authentication + Client ID management
Spotify/SpotifyAPIClient.swift Spotify Web API client
Spotify/SpotifyNowPlayingMonitor.swift Polling monitor for current track
Views/SettingsView.swift Settings UI with music source toggle + Spotify config

Setup

  1. Go to https://developer.spotify.com/dashboard
  2. Create a new app
  3. Add redirect URI: iris-spotify-auth://callback
  4. Copy the Client ID
  5. In the app: Settings → Spotify → Configuration → paste Client ID → Save
  6. Tap "Connect to Spotify"

Test plan

  • Build and run on iOS device
  • Configure Client ID in Settings
  • Connect Spotify account
  • Toggle between Apple Music and Spotify sources
  • Verify current track displays on Glass when playing Spotify
  • Verify disconnect clears tokens and resets to Apple Music

🤖 Generated with Claude Code

## Summary - Add OAuth 2.0 PKCE authentication for Spotify Web API - Create `SpotifyNowPlayingMonitor` for polling current track (every 4 seconds) - Add Settings tab with music source toggle (Apple Music / Spotify) - Store tokens securely in iOS Keychain - Display current Spotify track on Glass as `NOW_PLAYING` card (Title + Artist + Album) - Add in-app UI to configure Spotify Client ID (expandable Configuration section) ## New Files | File | Purpose | |------|---------| | `Spotify/KeychainHelper.swift` | Secure token storage | | `Spotify/SpotifyModels.swift` | API response models + `MusicSource` enum | | `Spotify/SpotifyAuthManager.swift` | OAuth 2.0 PKCE authentication + Client ID management | | `Spotify/SpotifyAPIClient.swift` | Spotify Web API client | | `Spotify/SpotifyNowPlayingMonitor.swift` | Polling monitor for current track | | `Views/SettingsView.swift` | Settings UI with music source toggle + Spotify config | ## Setup 1. Go to https://developer.spotify.com/dashboard 2. Create a new app 3. Add redirect URI: `iris-spotify-auth://callback` 4. Copy the Client ID 5. In the app: Settings → Spotify → Configuration → paste Client ID → Save 6. Tap "Connect to Spotify" ## Test plan - [ ] Build and run on iOS device - [ ] Configure Client ID in Settings - [ ] Connect Spotify account - [ ] Toggle between Apple Music and Spotify sources - [ ] Verify current track displays on Glass when playing Spotify - [ ] Verify disconnect clears tokens and resets to Apple Music 🤖 Generated with [Claude Code](https://claude.com/claude-code)
chezu added 2 commits 2026-01-10 20:59:16 +00:00
- 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>
- Add expandable Configuration section in Spotify settings
- Store Client ID in UserDefaults
- Show Connect button only when Client ID is configured
- Add helper text pointing to Spotify Developer Dashboard

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
kennethnym approved these changes 2026-01-10 21:00:09 +00:00
chezu added 1 commit 2026-01-10 21:09:09 +00:00
Resolve conflict in ContentView.swift by keeping both TodosView and SettingsView tabs.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
kennethnym closed this pull request 2026-01-10 21:11:53 +00:00
chezu deleted branch feat-spotify 2026-01-10 21:23:47 +00:00

Pull request closed

Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kennethnym/aris-old#3
No description provided.