Apple Music Offline Files Have no URL?

前端 未结 2 1387
被撕碎了的回忆
被撕碎了的回忆 2021-02-14 19:59

It seems that the property MPMediaItemPropertyAssetURL on a MPMediaItem returns null when the file is one that was from Apple Music and has been made \

相关标签:
2条回答
  • 2021-02-14 20:37

    It seems that Apple Music files are DRM-protected and subscription based, so probably Apple prohibits the use of references to these assets due to rights management.

    Reference: https://forums.developer.apple.com/thread/7389

    0 讨论(0)
  • 2021-02-14 20:38

    Things have changed a little and this isn't true anymore. MPMediaItemPropertyAssetURL is not nil on iOS 11 for songs saved offline via Apple Music but AVPlayer is unable to play them since they are still DRM protected. The same song returns MPMediaItemPropertyAssetURL nil on iOS 9.

    If you are interested in checking for DRM protected songs or in playing such songs, you can read my detailed answer here: https://stackoverflow.com/a/47694472/4331787

    0 讨论(0)
提交回复
热议问题