Skip to content

Making Remote Calls

When you interact with any of the APIs you pass in a SPTAppRemoteCallback block that gets invoked with either the expected result item or an NSError if the operation failed. The block is triggered after the command was received by the Spotify app (or if the connection could not be made).

Here is an example using the SPTRemotePlayerAPI to skip a song:


_10
[appRemote.playerAPI skipToNext:^(id _Nullable result, NSError * _Nullable error) {
_10
if (error) {
_10
// Operation failed
_10
} else {
_10
// Operation succeeded
_10
}
_10
}];