I am using cocoaLibSpotify to get the user playlists and relative containers.
I managed successfully the user connection but I am struggling to get the user playlists and relative folders/containers.
Also attempt to create a playlist have inconsistence results (only occasionally I see the playlist appearing on Spotify).
This the attempt on retrieving the user playlist:
//self.session = [SPSession sharedSession];
SPPlaylistContainer *container = [self.session userPlaylists]; // correctly initialised
NSArray *allPlaylists = container.playlists; // always Empty!
This my attempt on creating the playlist:
[SPSession dispatchToLibSpotifyThread:^{
// self.mpmePlaylistFolder = SPPlaylistFolder;
sp_playlist *spPlaylist = sp_playlistcontainer_add_new_playlist(self.mpmePlaylistFolder.parentContainer.container, name.UTF8String);
playlist = [SPPlaylist playlistWithPlaylistStruct:spPlaylist inSession:self.session];
_playlists = nil;
} waitUntilDone:YES];