Search code examples
importcommentsitunes

Xcode how to get iTunes track info from iTunes, specifically comments?


Can I input the user comments on tracks in iTunes into my App?


Solution

  • From your comments, it sounds like you're not actually on Mac, but iOS, and you're not actually trying to access comments from iTunes, but from the iOS music library.

    If so:

    NSString *comments = [currentItem valueForProperty:MPMediaItemPropertyComments];
    

    This will get you the comments in the iOS music library. However, there's no guarantee that the device will sync comments for any track that it syncs from iTunes (or purchases from the Store, or downloads from Match), so you may very well get nothing. In that case, there's nothing you can do about it.

    You cannot directly get the comments from iTunes, because you are not connected to iTunes.