spotify playlistsForUserWithSession 调用 returns 无效数组

spotify playlistsForUserWithSession call returns invalid array

在 Spotify 的最新 beta iOS sdk 上调用 playlistsForUserWithSession 时,我得到了似乎是正确数组的内容,因为我可以执行 'po pl.items' 并且它显示了一个播放列表列表调试 window。但是,如果我尝试执行 pl.items.count 我得到 "member reference base type 'void *' is not a structure or union" 如果我尝试 pl.items[0] returns 错误 "subscript of pointer to incomplete type 'void'" 这是我的代码。感谢:

SPTAuth *auth = [SPTAuth defaultInstance];

//get list of current playlists
[SPTPlaylistList playlistsForUserWithSession:auth.session callback:^(NSError *error, id object) {

    if (!error) {
        NSURL *playlistURL = nil;
        pl= object;

       //at this point, the pl object isn't playing nice
        if(pl != nil && pl.items != nil && pl.items.count > 0) {
            playlistURL = [pl.items[0] uri];
        } else {
           //snipped code
        }
        NSString * theResult = [playlistURL absoluteString];
        //snipped code
        } else {
            NSLog(@"Problem with the Spotify media Picker...");
        }
    }
}];

在我的实现中,我使用了来自 SPTTrackProvider

tracksForPlayback 方法委托

一段代码

@property (strong, nonatomic) SPTPlaylistList *SpotifyLists;

SPTPartialPlaylist *partialPlayList = [[_SpotifyLists tracksForPlayback] objectAtIndex:indexPath.row];
UIImage *placeHolder = [UIImage imageNamed:@"PlaceHolder.jpg"];
[cell.profileImageView setImageWithURL:partialPlayList.smallestImage.imageURL placeholderImage:placeHolder];
cell.titleLabel.text = [NSString stringWithFormat:@"%@", partialPlayList.name];
cell.auxilaryLabel.text = [@(partialPlayList.trackCount) stringValue];

虽然

不太确定何时使用items属性

事实证明,如果我通过代码访问对象,它们工作正常,但如果我尝试使用 PO 命令查看它们,它们就无法工作,所以看起来一切正常。