im working on a Spotify IOS app and i’ve been trying to get the users’s playlists using
[[SPSession sharedSession]userPlaylists]
Most of the times, it doesn’t return any playlists, occasionally, it does return all the playlists. I am logged in correctly since
[[SPSession sharedSession] starredPlaylist]
and
[[SPSession sharedSession] inboxPlaylist]
always return the playlist
Anyone have any idea whats going on?
Everything in CocoaLibSpotify is asynchronous — you’ll need to wait until the
loadedproperty ofuserPlaylistsreturnsYESbefore theplaylistsproperty contains anything useful, and each playlist contained within has aloadedproperty that is set toYESwhen the playlist’s name and track listing has been loaded.All properties in the playlist stack (and elsewhere in CocoaLibSpotify) are Key-Value Observing compliant. The best approach is to observe the properties you’re interested in, then react when they’re set.