BillyCurtis / OpenSpotifySafariExtension

Displays an Open in Spotify alert for sideloaded Spotify App
114 stars 17 forks source link

I get this error message #4

Closed JackPlaysGames0510 closed 5 months ago

JackPlaysGames0510 commented 6 months ago

I get an error message when it open a Spotify link open the link but if the app is already open it works fine IMG_0680

BillyCurtis commented 5 months ago

This is probably an issue with the EeveeSpotify tweak since all links are handled by it. 

I'm guessing since the app was closed when it was opened from a link Spotify handled before EeveeSpotify did, and since Spotify doesn't recognise /eevee/ in the link, it's giving you that error. 

Maybe @whoeevee can fix this? 

JackPlaysGames0510 commented 5 months ago

talk to them and i don't think they can't be fix

whoeevee commented 5 months ago

The issue is, when the app is closed, the method openURLContexts that EeveeSpotify hooks for opening links is not called. Instead, there is willConnectToSession:options: and Spotify is not recognizing /eevee/ in the link provided by OpenSpotifySafariExtension. I initially didn't implement hook of this method because Orion was giving me errors, and there were some problems with WindowHelper.

But now, I've fixed that by hooking the URL method of UIOpenURLContext that is called when you open the link both when the app is launched or not. It checks the link, and if it's from OpenSpotifySafariExtension, replaces with the original Spotify link. Works perfectly, see: https://github.com/whoeevee/EeveeSpotify/commit/2922687

JackPlaysGames0510 commented 5 months ago

oh I see this is interesting I'm glad you found an update for this can't wait for the update