userPlaylists returns empty

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?

Answers


Everything in CocoaLibSpotify is asynchronous — you'll need to wait until the loaded property of userPlaylists returns YES before the playlists property contains anything useful, and each playlist contained within has a loaded property that is set to YES when 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.


Need Your Help

Pretty printing a method in ASM Bytecode

java bytecode java-bytecode-asm

I am trying (with no success) to print only the contents of a given method. The following code almost does the trick:

Declare an external local variable with a keyword?

c++ inheritance operator-overloading external keyword

I would like to understand why can't C++ provides a keyword to declare a variable in a called function, local to the calling function.