2
我已經下載Spotify的IOS Cocoa庫,它具有在spotify中播放歌曲的示例項目。如何檢索iphone應用程序中的spotify播放列表
我需要在iPhone應用程序中獲取Spotify特定用戶的播放列表?
我已經下載Spotify的IOS Cocoa庫,它具有在spotify中播放歌曲的示例項目。如何檢索iphone應用程序中的spotify播放列表
我需要在iPhone應用程序中獲取Spotify特定用戶的播放列表?
您可以試試這個 -
[SPAsyncLoading waitUntilLoaded:[SPSession sharedSession] timeout:kSPAsyncLoadingDefaultTimeout then:^(NSArray *loadedession, NSArray *notLoadedSession)
{
// The session is logged in and loaded — now wait for the userPlaylists to load.
[SPAsyncLoading waitUntilLoaded:[SPSession sharedSession].userPlaylists timeout:kSPAsyncLoadingDefaultTimeout then:^(NSArray *loadedContainers, NSArray *notLoadedContainers)
{
// User playlists are loaded — wait for playlists to load their metadata.
NSMutableArray *playlists = [NSMutableArray array];
[playlists addObject:[SPSession sharedSession].starredPlaylist];
[playlists addObject:[SPSession sharedSession].inboxPlaylist];
[playlists addObjectsFromArray:[SPSession sharedSession].userPlaylists.flattenedPlaylists];
[SPAsyncLoading waitUntilLoaded:playlists timeout:kSPAsyncLoadingDefaultTimeout then:^(NSArray *loadedPlaylists, NSArray *notLoadedPlaylists)
{
// All of our playlists have loaded their metadata — wait for all tracks to load their metadata.
arrPlaylist = [[NSMutableArray alloc] initWithArray:loadedPlaylists];
NSLog(@"arrPlaylist %@",arrPlaylist);
}];
}];
}];