ios-sdk icon indicating copy to clipboard operation
ios-sdk copied to clipboard

PlayerAPI `enqueueTrackUri(...)` returns `SPTAppRemoteCallResponse`, not `YES`

Open boscojwho opened this issue 3 years ago • 1 comments

Documentation in latest version of SDK says playerAPI.enqueueTrackUri(...) returns YES on success, but actual return value is an instance of SPTAppRemoteCallResponse, for which there isn't documentation(?). Screen Shot 2021-04-12 at 6 07 25 PM

Screen Shot 2021-04-12 at 6 06 08 PM

Should we just assume enqueue operation succeeded if error is nil, instead of checking for the result value in SPTAppRemoteCallback?

boscojwho avatar Apr 13 '21 01:04 boscojwho

Because SPTAppRemoteCallback is a global general callback object, result is of id type. You need to use result and NSError to judge by yourself

typedef void (^SPTAppRemoteCallback)(id _Nullable result, NSError * _Nullable error);

monkeyRing avatar Mar 07 '22 02:03 monkeyRing