-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SPTAppRemote checkIfSpotifyAppIsActive always returns false if Spotify app has been restarted since last connection #438
Comments
To provide some additional information, connection attempts to the SPTAppRemote also fails in this state even though the Spotify app is running and playing music in the background. Error print: For reference we are using |
I am observing the same behavior in |
@cwalo Are you sure it worked on If it's working on iOS 17.6.1 I would suspect it's an Spotify App update regression. |
@Fump Wow, actually, you're correct. I downgraded back to 1.2.5 and see the same behavior there. Not sure how long it's been broken, but looks like I didn't notice because I have a fallback that polls the web api. For me, trying to connect with
No errors are returned in the delegate callback: |
Well that answers that https://github.com/spotify/ios-sdk/releases/tag/v3.0.0
|
Too bad, but at least it’s a clear answer to why it’s not working anymore. Thanks for notifying @cwalo ! @jalopezcar would it be possible to get some guidance on how we can continue to support connecting to the Spotify app without an app jump if it’s already playing music in the background? When we already have a valid user auth token that is. Or is that flow simply not supported anymore after this change? |
I alluded to it (why I didn't notice this was broken), but here's what I've been doing:
Note: I'm not currently using the SDK for remote control, just getting the player state. |
While we understand now the the |
We use to
SPTAppRemote checkIfSpotifyAppIsActive
to check if the Spotify app is running in the background. If it is isActive we use theSPTAppRemote
and attempt to connect and observe current playback for already authorized users. I have noticed that if the Spotify app has been restarted since the last time we were connected to theSPTAppRemote
thencheckIfSpotifyAppIsActive
always returns false in its completion handler. The expected behaviour is thatcheckIfSpotifyAppIsActive
always would return true if the Spotify is running in the background.I'm fairly certain that this worked for us before the summer (June 2024), so I'm suspecting either a regression due to iOS 18 or a new Spotify app update. I have tested to revert to an older SDK version (2.1.1) but still having the issue.
Steps to reproduce:
SPTAppRemote checkIfSpotifyAppIsActive
and completion handler is called with isActive false.After we have had an succesful connection with the SPTAppRemote checkIfSpotifyAppIsActive returns expected values until Spotify app is re-launched again.
Spotify SDK version: 2.1.7
Spotify App version: 8.9.76
iOS version: 18.0
Xcode version: 16.0
The text was updated successfully, but these errors were encountered: