草庐IT

addItemWithProductID

全部标签

ios - 使用时出错 -[MPMediaPlaylist addItemWithProductID :completionHandler:]

我正在尝试使用9.3中的新AppleMusicAPI将歌曲添加到我的应用程序创建的播放列表中,而不是将其添加到用户的音乐库中。考虑产品ID316654632,它是美国iTunesStore中Phoenix的歌曲Lisztomania。使用下面的代码,我可以播放歌曲MPMusicPlayerController*musicPlayer=[MPMusicPlayerControllersystemMusicPlayer];[musicPlayersetQueueWithStoreIDs:@[@"316654632"]];[musicPlayerplay];使用以下代码,我可以将歌曲添加到我