Hi,
In my iOS application I am login user through SPTSessionManager and saving the given accessToken, refreshToken and expiration date. Later I refresh the access token 5 mins before the expiration.
I want to play tracks using SPTAudioStreamingController. Every time when I am opening my app I use to configure my player like this,
= = = = = = = = = = = = = = = = = = = = = = =
self.player = SPTAudioStreamingController.sharedInstance()
self.player?.delegate = self
do {
try? player?.start(withClientId: clientID)
self.player?.login(withAccessToken: accessToken)
}
catch (let err) {
debugPrint(String(describing: err))
}
= = = = = = = = = = = = = = = = = = = = = = =
But I am getting an error in the delegate function "didReceiveError" of SPTAudioStreamingDelegate and the error is
Error Domain=com. Spotify.iOS-SDK.playback Code=8 \"Wrong username or password\"
What it could be the reason behind it? Am I doing the right thing when configuring player?
***One thing I have noticed, whenever(even when i am installing the app for the first time) self.player?.loggedIn return always true, though I am not using this variable anywhere yet***