denoni / SpotifyClone

An iOS app that visually clones Spotify's app and consumes the official Spotify's Web API to show(and play) songs, podcasts, artists and more.
MIT License
235 stars 49 forks source link
ios spotify spotifyapi swift swiftui

SpotifyClone

An iOS app that visually clones Spotify's app and consumes the official Spotify's Web API to show(and play) songs, podcasts, artists and more.

The app can play a 30-second preview of a song, otherwise, to play the full song it would be necessary to have a physical device and the real Spotify app installed(requirements of the Spotify iOS SDK).

I've built the project by myself to learn more about iOS development, and to consolidate already learnt concepts by putting them into practice. By no means the project is perfect, so feel free to open issues or make pull requests with your own new features.

I hope you enjoy the app. Feel free to hit me up!

-Gabriel


Home Screen Search Screen Track Details Screen Playlist Details Screen
Screen Shot 2021-10-11 at 11 59 25 AM Screen Shot 2021-10-11 at 12 00 41 PM Screen Shot 2021-10-11 at 11 59 34 AM Screen Shot 2021-10-11 at 12 00 36 PM
Artist Details Screen Podcast Details Screen Album Details Screen Active Searching Screen
Screen Shot 2021-10-11 at 12 00 11 PM Screen Shot 2021-10-11 at 12 01 16 PM Screen Shot 2021-10-11 at 11 59 43 AM Screen Shot 2021-10-11 at 12 01 01 PM





How to set up (>5 min)

  1. Fork this project and git clone ...
  2. Create/login with your Spotify Account in the Spotify for Developers website.
  3. Go to dashboard and select 'Create an app'.
  4. Give the name and description that you want and in the dashboard select the app that you've just created.
  5. Go to your local clone of the project in your machine and open 'YourSensitiveData.swift' (./SpotifyClone/SpotifyCloneProject/YourSensitiveData).
  6. Back in your application page of the dashboard, copy the 'Client ID' and 'Client Secret' and paste them in 'YourSensitiveData.swift'.
  7. Again in the dashboard select 'Users and access' an then click in 'Add new user'(if you try to log-in into an account in the app without adding it here, your app will crash with error 403 because Spotify's API doesn't allow that).
  8. In the dashboard select 'EDIT SETTINGS', in the field redirect_uri paste https://www.github.com (can be any website, but needs to match the redirect_uri set in AuthViewModel.swift, that by default was set to https://www.github.com)
  9. Great! Now you just need to run the app!

If you have any problem, feel free to contact me on github





Concepts & Technologies Used



Turn on the video volume

Stuttering is due to simulator lag and shouldn't happen on real device.



Code Overview

ViewModels

Main

Auth

Home

Search

Details

¹ The viewmodel for when the user is actively searching for an item.
² The viewmodel for when the user just opened the SearchScreen, it's similar to a discover screen.

Things to do/improve




DeC-SV5W4AEDegt