removeTracksFromPlaylist not removing tracks with ios spotify sdk -


i testing method remove tracks playlist. modified demo project "simple track playback" provided sdk. wanted remove track form playlist when hit fastforward. changed fastforward method way it's not doing anything, , error nil.

-(ibaction)fastforward:(id)sender {     if([self.player isplaying] && self.currentplaylistsnapshot){         sptauth *auth = [sptauth defaultinstance];         [self.currentplaylistsnapshot removetracksfromplaylist:@[self.player.currenttrackuri]                                     withaccesstoken:auth.session.accesstoken                                     callback:^(nserror *error) {                                         if (error != nil) {                                             nslog(@"*** failed remove track : %@", self.titlelabel.text);                                             return;                                         }                                     }];     }      [self.player skipnext:nil]; } 

self.currentplaylistsnapshot 1 i've got handlenewsession method.

there's static method apparently offering similar have't tried yet. + createrequestforremovingtracks:fromplaylist:withaccesstoken:snapshot:error:

according documentation both options implemented asynchronously , take seconds reflect results in server i'm suspecting there's either wrong or i'm missing actual request push changes on local snapshot maybe?

documentation: https://developer.spotify.com/ios-sdk-docs/documents/classes/sptplaylistsnapshot.html#//api/name/removetrackswithpositionsfromplaylist:withaccesstoken:callback:

ios sdk: https://github.com/spotify/ios-sdk

i solved issue reseting simulator + adding sptauthplaylistmodifypublicscope (which fogot do...)

auth.requestedscopes = @[sptauthstreamingscope, sptauthplaylistmodifypublicscope]; 

Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -