On a physical iPhone4/iPad2 I am logged into GameCenter as a tester using a non-live leaderboard.
I’ve noticed that during testing, after the [Show External Login UI] has displayed the “Welcome back” banner,
calling [Read Leaderboard Integer] doesn’t always return the latest highscore that is shown in my sandbox leaderboard. However, the returned result is quite random.
E.g. my leaderboard currently has a highscore of 592.
After uninstalling/installing my app on a device, after the “Welcome back” banner [Read Leaderboard Integer]
sometimes returns 592, but 70% of the time it returns 0 or a score like ‘32’ which happens to be
a previous [Write leaderboard Integer] call from a prior test. (I am definitely logged in successfully using iPhone->Settings).
I’ve even confirmed tests where I re-run the same app test (no changes)
an hour or so later and [Read Leaderboard Integer] returns 592 as expected.
Whenever I encounter issues like this I always do a test with the TappyChicken uproject
using my dev-provisioning-cert (to check if the issue is local to my app) but the result is generally the same
on both projects.
I don’t seem to have any control over when the correct highscore is returned so hope this is just a dev server
anomaly and doesn’t happen for live leaderboards.
Is this normal behaviour for Sandbox GameCenter Leaderboards?
Example Scenario:
The Leaderboard is currently showing a highscore of 592.
I do a new install on my iPad and play a test game. I get a new score of 87.
This score of 87 is correctly written to the GameCenter leaderboard because if I do a fresh install
of the same game on my iPhone it show the latest highscore of 87 before I even start the game.
So presumably everything is (99%) working as expected.
However, I don’t understand why [Read Leaderboard Integer] thinks the latest server highscore is 87 and not 592.
No doubt if I run the same test tomorrow morning then both devices will eventually show a highscore of 592.
I will confirm…
UPDATE:
High score after log in on both devices was still 87.
GameCenter leaderboard is still 592.
Yes, I could clear the leaderboard data, but that won’t give any closure as to why
the 87 is being returned instead of 592.