0
我想獲取播放列表名稱,但它提供了Mpconcreteitem的值。未從Apple音樂獲取播放列表名稱
let myQuery2 : MPMediaQuery = MPMediaQuery.playlists()
let playlist = myQuery2.collections
print(playlist!)
for album in playlist!{
print("---------------")
print("playlist \(String(describing: album.items)))")
if album.items.count == 0 {
} else {
print(album.items[0].value(forProperty: "MPMediaPlaylistPropertyName"))
}
}