Hi there,
The following code snippet will open Apple Music on an iOS device to a catalog
playlist, using the globalId
.
if let url = URL(string: "music://music.apple.com/us/playlist/\(playlist!.attributes.playParams.globalId!)") {
await UIApplication.shared.open(url)
What I'd like to do is open Apple Music using the standard ID, as I don't want to force users to make a playlist public in order to link to it from my app.
This requires the above code to use a library
link instead of a catalog
link.
I've tried various permutations of the url, but I can't seem to find the secret sauce.
Any tips, would be most appreciated.
Thanks!