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 · 1 comment
Open

iOS 18 authorizeAndPlayURI broken #440

PhilipTrauner opened this issue Sep 23, 2024 · 1 comment

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=)

@zallanx
Copy link

zallanx commented Nov 15, 2024

Thanks for the super helpful report. Was not even aware that this was a hard depreciation that didn't jive with the prior versions of the SDK, which resulted in no audio.

Thankfully the new version, v 3.0.0 (https://github.com/spotify/ios-sdk/releases/tag/v3.0.0), solves this issue.

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

2 participants