您好我正在尝试添加歌曲列表以进行spotify,列表包含在tracksUri中,在调用SPTTrack.trackswithURIs后,预计会返回一个曲目数组,然后可以使用SPTPlaylistSnapshot addTracksToPlaylist方法添加到spotify中。我哪里错了?
SPTTrack.tracksWithURIs(tracksUri as [AnyObject], session: session, callback: {
(error, objects) in
if (error == nil) {
let myArray:NSArray = objects as AnyObject! as! NSArray
list.addTracksToPlaylist(myArray as [AnyObject], withSession: session, callback: {
(error) in
if (error == nil) {
self.saveSongs()
}
})
}
})