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

How to create tables in Oracle DB from the set of *.sql files

sql database oracle oracle11g

I have the set of *.sql files (>200) which contains scripts of tables creation. How can I apply all of them automatically to Oracle DB?