An Example App that demonstrates the usage of SpotifyAPI, a Swift library for the Spotify web API.
Requires Xcode 12 and iOS 14.
To compile and run this application, go to https://developer.spotify.com/dashboard/login and create an app. Take note of the client id and client secret. Then click on "edit settings" and add the following redirect URI:
peter-schorn-spotify-sdk-app://app-remote-callback
Then, add the bundle id of this app to the "Bundle IDs" section at the bottom of the settings (your bundle id may be different):
This app requires a custom backend server that retrieves the authorization information on behalf of your app. It must have an endpoint that swaps the authorization code for the access and refresh tokens (TOKENS_URL) and an endpoint that uses the refresh token to get a new access token (TOKENS_REFRESH_URL), as described in Token Swap and Refresh. You can use the /authorization-code-flow/retrieve-tokens and /authorization-code-flow/refresh-tokens endpoints of SpotifyAPIServer, respectively, for this functionality. This server can be deployed to heroku in one click.
Next, set the CLIENT_ID , TOKENS_URL, and TOKENS_REFRESH_URL environment variables in the scheme:
To expirement with this app, add your own views to the List in ExamplesListView.swift.

