brim-borium/spotify_sdk

SpotifySdk.play(<playlist.url>) doesn't work on iOS

Closed this issue · 4 comments

Describe the bug
SpotifySdk.play() works ok on Android but not on iOS.
On iOS it opens spotify app and starts playing whatever it was playing before on spotify.
It doesn't return to the app after neither and on android it does.

Smartphone (please complete the following information):

  • Device: iphone 8
  • OS: 14.2

Yes I did everything on "Setup the iOS SDK" part on the guide.
Yes, the example app also fails... Opens spotify and the activity indicator shows a "X" symbol, representing something failed.

Ok, Solved it.
Solution:

  • Use getAuthenticationToken instead of connectToSpotifyRemote
  • When adding the redirect Uri to info.plist on xcode, don't use the uri except "://callback" part.
    That was it.

I tried to reproduce it but it worked fine. Since you were getting an "X" symbol within Spotify that meant that there was misconfiguration on your side and Spotify refused to authenticate you.
If you used the sample credentials those were invalidated from Spotify a few days ago.
I will improve the documentation a bit to make sure that no configuration steps are missed.