Opening spotify app from my iphone app

后端 未结 2 804
不知归路
不知归路 2020-12-08 23:56

I\'m pretty sure there must be a way to launch spotify iphone app from my own app. I\'ve seen SMP app (share my playlist) doing something very similar when pushing playlist

2条回答
  •  眼角桃花
    2020-12-09 01:00

    The quick fix I made was to remove the urlscheme that was added to the original uri. so you'll be calling the uri directly.

    which is 'spotify:artist:4gzpq5DPGxSnKTe4SA8HAU' or 'spotify:track:1dNIEtp7AY3oDAKCGg2XkH'

    UIApplication.shared.openURL("spotify:artist:4gzpq5DPGxSnKTe4SA8HAU") or UIApplication.shared.openURL("spotify:track:1dNIEtp7AY3oDAKCGg2XkH")

    this fix is for the crash when calling the old urlscheme from v6 and above.

提交回复
热议问题