spotify / ios-sdk

Spotify SDK for iOS
https://developer.spotify.com/documentation/ios/
659 stars 187 forks source link

Possible to login with Spotify without install spotify main application in ios sdk? #147

Open surani444 opened 5 years ago

surani444 commented 5 years ago

I want to implement Authentication with Spotify account without installing the main application and also user can read private playlist and play a song.

WickedChicken42 commented 5 years ago

Not with the new iOS SDK, the app is required. You would have to use the older streaming SDK which is wrappers around the WEB interface but that SDK is no longer supported/updated.

surani444 commented 5 years ago

Thank you so much @WickedChicken42 , One more question after authentication with Spotify main app is possible to play a song in my app without redirecting to Spotify main app?. Currently when I change song every time app redirecting to Spotify main app for authentication and after authentication complete again back to my app.

self.appRemote.authorizeAndPlayURI(self.songUri)

kkarayannis commented 4 years ago

You can play a track using this method:

- (void)playItem:(id<SPTAppRemoteContentItem>)contentItem callback:(nullable SPTAppRemoteCallback)callback;

https://github.com/spotify/ios-sdk/blob/master/SpotifyiOS.framework/Versions/A/Headers/SPTAppRemotePlayerAPI.h#L71