An iOS app to authenticate as well as perform GET and POST calls to the Spotify Web API
This app authenticates to the Spotify Web API using the user's Spotify credentials. Once logged in they are provided with an access token that is then used by the app to perform various network calls. Additionally, songs can be saved locally to a user's favorite songs list.
- Authenticates to the Spotify Web API to enable API calls
- Initiates POST calls to get access token from access code/refresh token
- Performs GET calls to Spotify endpoints
- GET user's top artists
- GET user's top tracks
- GET Global Top 50 tracks via playlist
- Handles expired access token, so users don't have to reauthenticate when token expires
- Previews 30-sec track audio (dependent on API response) using AVFoundation with pause and resume functionality
- Uses GCD(Grand Central Dispatch) to improve user experience
- Uses custom network layer to perform network calls
- Searches for artists or tracks from Spotify
Tap "Login Spotify" and once prompted provide your email and password for Spotify to authenticate and to fetch your top artists, top songs, see the world's current top 50 songs, or preform search functions.
Tap on the heart image to either favorite or remove a song as a favorite.
Tap anywhere else on the cell to hear a preview of the song only if there's a play button to the right (not all songs are previewable).
Project code can be viewed locally and run in Xcode's simulator by cloning or downloading this repo.
- Xcode - 12.1 - The IDE used
- Swift - 5.1.4 - Programming language
- Kingfisher - 5.14.0 - 3rd party library
- Cao Mai - Portfolio
This project is licensed under the MIT License - see the LICENSE file for details