使用iTunes中的歌曲制作本地播放列表
问题描述:
是否有机会搜索iTunes中的歌曲并将它们以编程方式添加到本地播放列表中?使用iTunes中的歌曲制作本地播放列表
BTW:我创建的本地播放列表成功,得到了JSON,但我不知道如何使用它:
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:@"https://itunes.apple.com/search?term=Gipsy+Kings+Bamboleo&country=US&media=music&entity=song"]];
[[[NSURLSession sharedSession] dataTaskWithRequest:request completionHandler: ^(NSData *data, NSURLResponse *response, NSError *error){
NSError *jsonError;
NSDictionary *jsonResult = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:&jsonError];
}] resume];
答
配置的用户在桌面上使用或通过-the-创建iTunes播放列表在设备上播放列表。对于您的iOS应用程序,(MPMediaPlaylist)
播放列表为只读。所以目前无法通过第三方应用创建这些内容。用户只能通过iTunes或通过内置的iOS音乐应用程序进行此操作。
希望这会帮助你。
+0
@ DZoki019对你有帮助吗? –
请检查我的答案。它可以帮助你。 –