Peter-Schorn / SpotifyAPI

A Swift library for the Spotify web API. Supports all endpoints.
https://peter-schorn.github.io/SpotifyAPI/documentation/spotifywebapi
MIT License
251 stars 32 forks source link

Apple TV deeplink integration not working?! #47

Closed pjkoning closed 11 months ago

pjkoning commented 11 months ago

My Question or Issue I build a radio-app for iOS, macOS and AppleTV called: radioNED+. I integrated Spotify with iOS. It works great. When a song in radioNED+ is also found on Spotify it shows a link to Spotify. Clicking on the link opens the song in spotify. But the integration with radioNED+ for AppleTV doesn't open the song in Spotify. It only open Spotify.

For example this link getting back from spotify only opens spotify but not on the selected song:

spotify:track:0qi4b1l0eT3jpzeNHeFXDT

It does in iOS.

Operating System tvOS 17 beta 5

Does anyone used this package to implement deeplink integration?

I like to have some help here 😉

I don't think it's a package issue but a Spotify issue, but can't reach anyone at spotify.

Peter-Schorn commented 11 months ago

No, this package will not help you with deep linking. Have you tried using a standard https URL? Apple's Universal Links feature may work with this.

Peter-Schorn commented 11 months ago

You can generate a https URL from a URI:

import SpotifyWebAPI

let uriString = "spotify:track:0qi4b1l0eT3jpzeNHeFXDT"

let url = try! SpotifyIdentifier(uri: uriString).url!

See here.

pjkoning commented 11 months ago

Does it generatie something like this?

https://open.spotify.com/track/5EwltLwI9hRLyiTUAjMsQ6

That url I also can read from the spotifyAPI.

I will test it.

pjkoning commented 11 months ago

https://open.spotify.com/track/5EwltLwI9hRLyiTUAjMsQ6 won't open Spotify at all on tvOS.

Peter-Schorn commented 11 months ago

https://open.spotify.com/track/5EwltLwI9hRLyiTUAjMsQ6

That's all my library can provide.

pjkoning commented 6 months ago

I think Spotify didn't implement deep linking in their tvOS app :(