Problems Using LeaderBoardService

0 votes
Hi,

 

I am facing issues in integrating the API App42 Sdk in iOS.I want to use the leaderboard service.

I have gone through your documentation provided to CreateNewGame and save user score.

But i have several queries regarding integration.

Can you please arrange a call for support or suggest a way so that i can get my queries resolved.

 

Thanks

viral Dhingra
asked Sep 17, 2014 in AppWarpS2 by dhingra.viral2511 (10 points)

1 Answer

0 votes
Hi Viral,

Can you please list out the questions you have regarding integration?

And also which SDK and SDK version you are using?
answered Sep 17, 2014 by rajeev.etc (1,660 points)
I am using your App42_iOS_SDK_Master with version 2.8.1...So here is the list of questions

1. I need to create a game before i start saving user score.But in case i want to check for the first user whether that the game is already created or not.Then it does not respond on getAllgames.

2. Issue in saving user score:
Suppose one of the users installed the game for the first time and other has installed the game second time,also both of them log in through facebook.Then there is no way to check whether the user is installing it for first time or he has installed it earlier as well.
I wanted that i should be able to check based on his id whether he has installed this game earlier.if so then i want to provide him the score he left on.

How can i achieve these two steps using GameService And LeaderboardService.

Please Help.

Thanks
Please find the answers below:

Ans1: If you are calling save user score method without knowing the game is created or not. You will get the exception where app error code is 3002 with message "Game with the name '@name' does not exist.". In this case, you can put a condition to check appErrorCode and if it is 3002 then call the createGame API of GameService to create game. After then you can start saving scores by calling saveUserScore API.

Ans2: If you are saving score using fbID as userName, then the last saved score will be available for that particular userName in our database. It does not matter if the user uninstalls the game and installs again. You can always fetch the scores saved earlier using his fbId as userName. So there is no need to check that the user is installing app first time or second time.

Let me know if you have any further query.
Ok i got it.
Finally please tell me, how can i check the AppErrorCodes in the current SDK integration.
Please go through the code snippets given here:
http://api.shephertz.com/app42-docs/leaderboard-service/#exception-handling .
It will give you idea about the way of handling App42Exceptions.
Thanks alot. :)
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...