Hi,
Yes, we are working on it and we will update you once it is out .
But for now, you can call these API on separate threads to solve this problem.
For example:
-(void)saveScoreToApp42Server
{
[self performSelectorInBackground:@selector(saveScore) withObject:nil];
}
-(void)saveScore
{
ScoreBoardService *scoreboardService = [App42API buildScoreBoardService];
@try
{
NSString *userName = @"User_Name";
NSString *gameName = @"Game_Name";
double gameScore = 200;
Game *game = [scoreboardService saveUserScore:gameName gameUserName:userName gameScore:gameScore];
[self performSelectorOnMainThread:@selector(onSaveScoreResponse:) withObject:game waitUntilDone:NO];
}
@catch (App42Exception *exception)
{
[self performSelectorOnMainThread:@selector(onSaveScoreResponse:) withObject:exception waitUntilDone:NO];
}
@finally
{
}
}
-(void)onSaveScoreResponse:(id)response
{
/*
* Handle response here.
*/
if ([response isKindOfClass:[Game class]])
{
// For success response
}
else
{
// For exceoption
App42Exception *exception = (App42Exception*)response;
NSLog(@"Exception = %@",[exception reason]);
NSLog(@"HTTP error Code = %d",[exception httpErrorCode]);
NSLog(@"App Error Code = %d",[exception appErrorCode]);
NSLog(@"User Info = %@",[exception userInfo]);
}
}
Thanks.