App disconnected after few seconds and appRemote(_ appRemote: didDisconnectWithError:) called.
vibhootitatva opened this issue · 5 comments
I checked "NowPlayingView" demo provided by spotify, it is playing music in spotify and also providing control in my app to play/pause etc.
but when i pause playback after few seconds Spotify is disconnecting and appRemote(_ appRemote: didDisconnectWithError:) calling. And I am receiving this error:
Error Domain=com.spotify.app-remote Code=-1002 "Connection terminated." UserInfo={NSLocalizedDescription=Connection terminated., NSUnderlyingError=0x282386dc0 {Error Domain=com.spotify.app-remote.transport Code=-2001 "End of stream." UserInfo={NSLocalizedRecoverySuggestion=Reconnect to the Spotify app., NSLocalizedDescription=End of stream., NSLocalizedFailureReason=One of the streams has reached the end.}}, NSLocalizedRecoverySuggestion=Try to reconnect., NSLocalizedFailureReason=The Spotify app might have been suspended.}
I see your reply on #204, but my app is not suspended. as it is already open and running. Its not even in background. so there is an issue in spotify SDK, which is breaking connection between my app and spotify to remotely play.
To play music again, I have to authorise again to reconnect. obviously it is not good user experience and not even feasible flow.
Please help with solutions!