SwiftUI

spo.stats for Spotify

Personal Practice Release | Visual Listening-Trend Charts for Spotify

Tech Stack SwiftUISpotify APIOAuth 2.0 PKCECloudKitSelf-initiated
spo.stats for Spotify

Built because dry ranking lists never showed how my music taste shifts over time—turning Spotify history into interactive custom charts synced across Apple devices. Approved and shipped on the App Store, currently kept as a personal-use tool due to Spotify API developer quota limits.

Project Background

As an avid Spotify listener, I wanted to see how my favorite tracks rise and fade over time—but most existing tools only show dry text lists. So I built a chart-first personal listening tracker that turns raw rankings into readable visual trends. Independently built and approved on the App Store in late 2025, the app is currently positioned honestly as a personal-use and portfolio project after Spotify tightened developer quota rules (limiting non-enterprise apps to a 5-user whitelist).

01

Development Process

Design Process

  • Designed from my own need:Instead of drawing Figma screens, I built directly in Xcode as the target user. The core idea was "let charts speak", making visualization central rather than relying on data lists.
  • Dark theme and brand consistency:The interface uses a dark theme with Spotify green (#1DB954) as the main accent, while allowing users to customize theme colors.
  • Tab navigation:The app uses four tabs: Home, Search, Rankings, and Settings. The home tab works as a dashboard, while rankings support 1-month, 6-month, and all-time filters.

Engineering Process

  • Spotify OAuth 2.0 authentication:The app uses OAuth 2.0 with PKCE through ASWebAuthenticationSession, stores access tokens securely in Keychain, and supports automatic token refresh.
  • Three-layer data strategy:API response cache, UserDefaults local storage, and Spotify API updates balance fast startup with fresh data.
  • Ranking history tracking:RankingHistoryService records Top 50 snapshots at hourly intervals, keeps seven days of history, syncs through CloudKit, and clears expired data automatically.
  • Custom chart engine:SwiftUI Path is used to build line and bar charts from scratch, including drawing animation, interactive selection, dynamic axis scaling, and label collision handling.

02

Technical Challenges & Solutions

Spotify Developer Quota Mode Restrictions

Situation
After development, the app needed Spotify API access for broader public use.
Challenge
Spotify's 2025 developer policy separates Development Mode and Extended Quota Mode. Development Mode only allows a few whitelisted users, while Extended Quota Mode requires a registered business, an already live service, at least 250,000 monthly active users, and operation in Spotify's major markets. This is nearly impossible for an independent developer.
Solution
I repositioned the app as a personal-use tool under Development Mode. To pass App Store review, I built Demo Mode with simulated data so reviewers could experience the full app without logging into Spotify.
Result
The app was successfully published on the App Store. Although it cannot be broadly opened due to Quota Mode, it fully meets my personal needs and shows how I handled platform policy constraints.

Balancing Custom Chart Animation and Performance

Situation
To create a differentiated chart-focused experience, I decided not to use a third-party chart library.
Challenge
Custom charts required progressive line drawing, opacity switching across multiple lines, dashed segments when songs drop out of the ranking, dynamic Y-axis scaling, and label collision handling. The Top 5 multi-line chart was especially performance-sensitive.
Solution
I used SwiftUI `trim(from:to:)` with animation modifiers for progressive drawing and masking for dashed segments. To improve performance, chart recalculation only happens when data or selection state changes.
Result
The app delivers smooth chart animations, pulse effects, and interactive selection while maintaining a distinctive visual experience.

03

Design & Technical Highlights

Interactive Trend Charts Instead of Dry Lists

Puts visual storytelling front and center: the home chart plots 7-day rank movements for your Top 5 songs with tap-to-focus album covers, while song, artist, and album pages show custom line and bar charts—even using dashed lines when a track dips off the chart.

7-Day Ranking History Synced Across Devices

Captures hourly Top 50 snapshots to tag tracks as rising, falling, new, or steady, bringing history to life with smooth line-drawing animations and cross-device cloud sync.

Multi-Timeframe Song, Artist & Album Insights

Detail pages pair Info and Stats tabs with four timeframe cards (4-week, 6-month, all-time rank, and recent-play frequency). Tapping artist or album cards expands the exact tracks driving their chart share.

04

Learning & Reflection

  • From personal need to shipped product:The project confirmed the value of building from a real personal need. A desire for better Spotify charts became a complete App Store product.
  • Platform policy reality:Spotify's Quota Mode restriction became the project's biggest turning point. It taught me to study API platform policies early before investing heavily in a product direction.
  • Technical depth through custom charts:Building charts from scratch took more time but deepened my understanding of SwiftUI animation, Path drawing, and state management.
  • App Store review preparation:Because Spotify login access was limited, Demo Mode was necessary for review. This taught me that shipping also means preparing for review scenarios, not only finishing code.