Skip to content
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

iOS 18 authorizeAndPlayURI broken #440

Open
PhilipTrauner opened this issue Sep 23, 2024 · 0 comments
Open

iOS 18 authorizeAndPlayURI broken #440

PhilipTrauner opened this issue Sep 23, 2024 · 0 comments

Comments

@PhilipTrauner
Copy link

authorizeAndPlayURI internally uses UIApplication.openURL(_ url: URL) -> Bool. While this method has been soft-deprecated for a while now, that appears to have changed in iOS 18.

BUG IN CLIENT OF UIKIT: The caller of UIApplication.openURL(_:) needs to migrate to the non-deprecated UIApplication.open(_:options:completionHandler:). Force returning false (NO).

SPTSessionManager.initiateSession does not appear to be affected.

Workaround

This is the structure of the URL that authorizeAndPlayURI attempts to open:

when not playing as radio
spotify-action://authorize?response_type=token&client_id=<client-id>&redirect_uri=<redirect-uri>&play_uri=<play-uri>&bundle_id=<bundle-id>&minimum_version&analytics_id&remote_session_id=<remote-session-id>&scope=app-remote-control
when playing as radio
spotify-action://authorize?response_type=token&client_id=<client-id>&redirect_uri=<redirect-uri>&play_uri=<play-uri>&bundle_id=<bundle-id>&minimum_version&analytics_id&remote_session_id=<remote-session-id>&play_radio=true&scope=app-remote-control

remote_session_id is optional, and play_uri can be an empty string (play_uri=)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant