{"action":"created","issue":{"url":"https://api.github.com/repos/spotify/ios-sdk/issues/343","labels_url":"https://api.github.com/repos/spotify/ios-sdk/issues/343/labels{/name}","comments_url":"https://api.github.com/repos/spotify/ios-sdk/issues/343/comments","events_url":"https://api.github.com/repos/spotify/ios-sdk/issues/343/events","html_url":"https://github.com/spotify/ios-sdk/issues/343","id":78478503,"number":343,"title":"SPTTrack trackWithURI issue","user":{"login":"Kry256","id":1412738,"avatar_url":"https://avatars.githubusercontent.com/u/1412738?v=3","gravatar_id":"","url":"https://api.github.com/users/Kry256","html_url":"https://github.com/Kry256","followers_url":"https://api.github.com/users/Kry256/followers","following_url":"https://api.github.com/users/Kry256/following{/other_user}","gists_url":"https://api.github.com/users/Kry256/gists{/gist_id}","starred_url":"https://api.github.com/users/Kry256/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kry256/subscriptions","organizations_url":"https://api.github.com/users/Kry256/orgs","repos_url":"https://api.github.com/users/Kry256/repos","events_url":"https://api.github.com/users/Kry256/events{/privacy}","received_events_url":"https://api.github.com/users/Kry256/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-05-20T11:04:29Z","updated_at":"2015-06-22T14:33:11Z","closed_at":null,"body":"Before last SDK update, I was using \r\n\r\n```\r\n[SPTRequest requestItemAtURI:[NSURL URLWithString:trackUri]\r\n\t\t                withSession:self.session\r\n\t\t\t              callback:^(NSError *error, id object) {\r\n                             // Some stuff\r\n\t\t\t\t\t}];\r\n```\r\n\r\nto retrieve a complete ___SPTTrack___ object inside the ___SPTAudioStreamingController___ callback\r\n```\r\n-(void)audioStreaming:(SPTAudioStreamingController *)audioStreaming didChangeToTrack:(NSDictionary *)trackMetadata {__\r\n          // Do the request\r\n}\r\n```\r\n\r\nAfter the update to the _beta 8_ version, I noticed that the method in ___SPTRequest___ class was deprecated, so, as specified in your documentation, I start using the \"equivalent\" method inside ___SPTTarck___ class.\r\n\r\n```\r\n[SPTTrack trackWithURI:[self getSpotifyURIFromSpotifyID:trackUri]\r\n                  accessToken:self.session.accessToken\r\n\t\t            market:[self getUserMarketPlace]\r\n\t\t\t  callback:^(NSError *error, id object) {\r\n                     // Some other stuff\r\n}];\r\n```\r\n\r\nUnfortunately, this method is not so \"equivalent\", because the _SPTTrack_ object returned inside the callback of  __[SPTTrack trackWithURI....__ has many less informations than the one returned inside the callback of the deprecated __[SPTRequest requestItemAtURI...__.\r\nIn particular the _'album'_ property is always ___nil__ and is very annoying for me.\r\nI've tried some workaround, and I found that for me the solution is \r\n1 - create a request for an ___SPTTrack___ object\r\n2 - perform it with ___SPTRequest___ object\r\n3 - wait for the response, and eventually create a track _from data_ (here the complete code)\r\n\r\n```\r\nNSURLRequest *request = [SPTTrack createRequestForTrack:[NSURL URLWithString:trackUri]\r\n\t\t\t\t\t\t\t\t\t\t\twithAccessToken:self.session.accessToken\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t market:[self getUserMarketPlace]\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t  error:nil];\r\n[[SPTRequest sharedHandler] performRequest:request\r\n\t\t\t\t                               callback:^(NSError *error, NSURLResponse *response, NSData *data) {\r\n\t\t\t\t\t\t\t\t\t\t  if (!error) {\r\n\t\t\t\t\t\t\t\t\t\t\t  NSError *parsingError = nil;\r\n\t\t\t\t\t\t\t\t\t\t\t  SPTTrack *t = [SPTTrack trackFromData:data\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t   withResponse:response\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t  error:&parsingError];\r\n\t\t\t\t\t\t\t\t\t\t  }\r\n\t\t\t\t\t\t\t\t\t  }];\r\n```\r\n\r\nI found this solution a little too tricky, especially since there are ___trackWithURI...___ or ___tracksWithURIs...___ inside ___SPTTrack___ class and since the official documentation inside ___SPTRequest__ section says\r\n\r\n_ [...] This method is deprecated, use the helpers in each individual object class instead. [...]\r\n   For example: SPTTrack trackWithURI:session:callback: or `SPTPlaylistSnapshot playlistWithURI:session:callback [...]_"},"comment":{"url":"https://api.github.com/repos/spotify/ios-sdk/issues/comments/114131540","html_url":"https://github.com/spotify/ios-sdk/issues/343#issuecomment-114131540","issue_url":"https://api.github.com/repos/spotify/ios-sdk/issues/343","id":114131540,"user":{"login":"Kry256","id":1412738,"avatar_url":"https://avatars.githubusercontent.com/u/1412738?v=3","gravatar_id":"","url":"https://api.github.com/users/Kry256","html_url":"https://github.com/Kry256","followers_url":"https://api.github.com/users/Kry256/followers","following_url":"https://api.github.com/users/Kry256/following{/other_user}","gists_url":"https://api.github.com/users/Kry256/gists{/gist_id}","starred_url":"https://api.github.com/users/Kry256/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kry256/subscriptions","organizations_url":"https://api.github.com/users/Kry256/orgs","repos_url":"https://api.github.com/users/Kry256/repos","events_url":"https://api.github.com/users/Kry256/events{/privacy}","received_events_url":"https://api.github.com/users/Kry256/received_events","type":"User","site_admin":false},"created_at":"2015-06-22T14:33:11Z","updated_at":"2015-06-22T14:33:11Z","body":"Me too. Probably the issue is in the lines  \r\n```self.arrURIs = @[track];```\r\n```[self.player playURIs:self.arrURIs fromIndex:0 callback:nil];```\r\nYou are passing to **playURIs:** function an array of **SPTTrack**.\r\nMay be this cause the issue.\r\nTry this\r\n```self.arrURIs = @[track.playableUri];```\r\n"}}