Home > Software engineering >  How to use ''SpotifyiOS" framework and Authorize app without acutally playing a song
How to use ''SpotifyiOS" framework and Authorize app without acutally playing a song

Time:11-03

I am using 'SpotifyiOS' framework recommended by Spotify (appRemote.authorizeAndPlayURI(..

where appRemote is an instance of SPTAppRemote

It plays a song even if I pass empty String as URI as shown below:

enter image description here

How can I authorise app without playing any song using 'SpotifyiOS' famework?

CodePudding user response:

You can use the SPTSessionManager to authenticate without playing a song.

The flow is a bit more convoluted and better followed at the documentation link than copy/pasted here, but in short you configure the SPTSessionManager and provide it a delegate that on successful authentication provides a token to your SPTAppRemote which can then be used to control the application.

  • Related