npm install @getbaseline/capacitor-spotify
npx cap sync
iOS Setup
Add a redirect URI to your app as a URL scheme. We recommend using reverse domain notation (e.g app.getbaseline.baseline.spotify).
Add the following to the beginning of func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey: Any] = [:]) -> Bool in AppDelegate:
if (url.scheme =="YOUR URL SCHEME FROM STEP 2 HERE <e.g. app.getbaseline.baseline.spotify>"){NotificationCenter.default.post(name:NSNotification.Name("spotifyLogin"), object: url);
}
Add the following to your app's Info.plist (allows your app to open the Spotify app for auth):