-
Notifications
You must be signed in to change notification settings - Fork 82
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
Currently-selected song begins playing when connecting to Spotify on iOS #86
Comments
@mcookhome this is "potentially" fixed now. Allow me to clarify "potentially"... When using the
There is an official way to mitigate that and that is to use Having said that you can try this small workaround that might solve your problem. In version 2.1.0 of the package there is a |
Awesome!! Thanks so much @fotiDim - can I start using version 2.1.0 now, or do I need to wait for a release? I only see version 2.0.0 on the pub.dev page: |
No need to wait. You can use this in your
Let me know how it works for you. |
Hey @fotiDim, unfortunately I'm finding the bug to still occur: Here's a snippet of my
I've run I had also tried using version |
Regardless, I don't think issue should remain closed, as it's still an active issue |
@mcookhome do you pass a spotifyUri? If yes which one? |
I don't pass a
In that snippet, the |
You can also see my attempts at passing an |
You need to pass a SpotifyURI:
For the other issue:
|
The problem with that is that if I pass an invalid Is there any way that the SDK can check the user's current player state, pass the My desired functionality of the connect method would be as follows:
If this is impossible that's fine, but I just wasn't sure if I was clear. |
I see. There is this native iOS SDK method that we could expose: /**
* Checks if the Spotify app is active on the user's device. You can use this to determine if maybe you should prompt
* the user to connect to Spotify (because you know they are already using Spotify if it is active). The Spotify app
* will be considered active if music is playing or the app is active in the background.
*
* @param completion Completion block for determining the result of the check. YES if Spotify is active, othewise NO.
*/
+ (void)checkIfSpotifyAppIsActive:(void (^)(BOOL active))completion; I believe it provides the information that you need. However automating |
@mcookhome regarding the |
any updates? |
Describe the bug
When opening an app integrating the SDK on iOS (for two iPhones with different versions), the Spotify app opens and plays the current song. Using breakpoints, I was able to pinpoint the last line of code before the Spotify app was opened to within the SDK here.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I would hope for the app to be able to connect to Spotify without opening the app and toggling the play state. However, according to @fotiDim, the Spotify app must still be opened regardless - but the music being played should be fixable.
Screenshots
video-1617059678.mp4
Smartphone (please complete the following information):
Additional context
Slack conversation
The text was updated successfully, but these errors were encountered: