brim-borium/spotify_sdk

[iOS] connectToSpotifyRemote() method doesn't throw an exception when Spotify App not installed

Closed this issue · 4 comments

SpotifySdk.connectToSpotifyRemote() should throw a PlatformException if Spotify is not installed on the client device. Instead right now, the command executes with no error, however the connection event is never emitted.

For the iOS SDK not having Spotify installed is a valid scenario since it should open the web browser instead.
I will have a look and see how I can improve this scenario. Thanks for reporting!

Hmm. On second thought, web authentication on iOS is not possible with the current auth flow we are using. I guess returning an error is the way to go. But as I said I will investigate a bit more.

I think it should be up to the developers what they decide to do in case Spotify is not installed. Some may want to redirect user to Spotify download link, use an alternative player, open the web player etc. Returning an error is the most universal solution, and it is also how the Android side is implemented.

This is now solved.