开发者

Obtaining iTunes ID to an iPod player item

开发者 https://www.devze.com 2022-12-15 16:43 出处:网络
I have an app that interacts with both the iPod player, and the iTunes Store Web Service Search API.Is there a way to obtain the iTunes ID for a song that I retrieve from my user\'s iPod library (e.g.

I have an app that interacts with both the iPod player, and the iTunes Store Web Service Search API. Is there a way to obtain the iTunes ID for a song that I retrieve from my user's iPod library (e.g. via MPMusicPlayerController, or MPMediaItem)?

The documentation says that开发者_JAVA技巧 the MPMediaItemPropertyPersistentID is a unique identifier that persists across app launch. This however, seems like it might be a unique local id.

The only solution I can think of is to retrieve the song title and artist from MPMediaItem, then query iTunes to obtain the iTunes ID. Is the iTunes ID stored anywhere locally within the iPod library?

Thanks - I am pretty new to the media framework.


The API documentation does not list a property for MPMediaItem that gives the iTunes Song ID, but it does give all of the information about a song such as the Artist and song name so, as you suggested, you could search the store for that criteria.

0

精彩评论

暂无评论...
验证码 换一张
取 消