I was able to get all the playlist of users using spotify ios sdk, this is my code.
[SPTPlaylistList playlistsForUserWithSession:session callback:^(NSError *error, id object) {
SPTListPage *pl= object;
NSLog(@"%@",pl.items);
}];
But I am not sure now How to get all the tracks of these playlists. any help?
Because this Spotify ios SDK v10beta is new and with many incomplete tasks, to access and be able to play all tracks in your playlists you have to run through many blocks.
First I would recommend to get the first SPTListPage object of all the playlists:
}
Then, merge all SPTListPage objects into one:
Now, SPTListPage contains SPTPartialPlaylist objects, which do not contain all the info of the playlists, so we need to convert it to SPTPlaylistSnapshot object:
Now you can access all the playlists and all the songs in them with a simple loop-through. I hope spotify will improve here as it is not how it supposed to be. Come on,Spotify!