How do remote calls work?

When you interact with any of the API’s 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:

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