1

When sharing playlist in Apple Music app via Email, you can get a URL like this

https://itunes.apple.com/jp/playlist/if-you-like...may-j./idpl.4299b4c5a42048bd850eca538e68ace2?l=en

You will also have an URL when sharing local created playlist.

I would like to know if it is possible to get the URL programmatically on iOS using Swift.

[Effort studied but failed to solve]

  1. Related discussion using link maker does not solve the problem Apple Music URL Scheme

  2. Query the playlist using: MPMediaQuery.playlists() and enumerated the returned playlist but cannot find any property showing the URL

Community
  • 1
  • 1
Jim Lee
  • 31
  • 5

1 Answers1

2

I'm pretty sure this is not possible. I believe the playlist does not have the idpl value until the user manually presses the share button in iTunes. And, there's nothing in the API to create one.

I set up a proxy and had a look at the requests iTunes makes.

I created a playlist in iTunes and added songs to the playlist. Every song I added made several requests to various endpoints under: https://ld-6.itunes.apple.com/WebObjects/MZDaap.woa/daap/update No idpl value in any of the responses.

Then I manually hit the share button. A request is made to https://client-api.itunes.apple.com/WebObjects/MZStorePlatform.woa/wa/lookup with the idpl in the URL.

Now when you add more songs to the playlist, the responses contain the idpl.

From that it seems that the idpl is created on the device when the user touches share.

Probably best to file a radar for Apple to add a share URL property to MPMediaPlaylist.

EDIT: I filed a radar

James Zaghini
  • 3,895
  • 4
  • 45
  • 61