Playbasis iOS SDK was initially designed to give developers flexibility and ease in integration into their own application.
Developers see Playbasis iOS SDK as a library to help them quickly understand data responded (json format) back from Playbasis platform, and be able to quickly develop their own application.
Playbasis iOS SDK consists of the following major components to help developers
Set of API calls are used to interact with Playbasis platform ie. logging in user, execute an action on behalf of certain user, register user, give user a reward etc.
As well, mobile application development on iOS, developers have to be aware of user experience (UX) thus having to deal with which thread to interact with to update UI elements or process tasks are among the top things to consider in development.
Playbasis takes this into account and exposes set of API call in different manners of thread situations. Consider API call to log in a certain user to Playbasis platform.
Developers can see all API call at http://doc.playbasis.com/pbapp/.
In iOS SDK, developers will see the following method calls declared in Playbasis.h file.
-(PBRequestUnit *)loginPlayer:(NSString *)playerId withDelegate:(id<PBResultStatus_ResponseHandler>)delegate; -(PBRequestUnit *)loginPlayer:(NSString *)playerId withBlock:(PBResultStatus_ResponseBlock)block; -(PBRequestUnit *)loginPlayerAsync:(NSString *)playerId withDelegate:(id<PBResultStatus_ResponseHandler>)delegate; -(PBRequestUnit *)loginPlayerAsync:(NSString *)playerId withBlock:(PBResultStatus_ResponseBlock)block; -(PBRequestUnit *)loginPlayerAsync_:(NSString *)playerId withBlock:(PBAsyncURLRequestResponseBlock)block;
One API call will consist of at least 4 method calls which can be used in various situations, with additional of one another method call to make a request with asynchronous url request to Playbasis platform.
Playbasis platform supports the following request
To avoid confusion, we have to point out that the we won’t use Asynchronous method call (as seen in the code) to describe Asynchronous URL Request. In terms of SDK, asynchronous method call can either make a synchronous url request, or asynchronous url request. Whenever we want to make a request with asynchronous url request, we will explicitly tell it as “asynchronous url request”.
Playbasis iOS SDK integrated a couple of great UI popups projects which are open source and highly adopted by iOS developers out there. This will reduce time if developer might need to integrate it into their own application. They can use it through our SDK.