I have switched from dual OpenFeint/GameCenter support to having Game Center only support for my iOS app.
The problem is that the gameNetwork.request( “setHighScore” ) call doesn’t appear to be setting any high scores.
On the documentation page: http://developer.anscamobile.com/reference/index/game-network/gamenetworkrequest a couple of other people have expressed similar issues.
My callback gets called, so it appears the call is “working”, however the scores do not get updated. The only thing I can think of is that the “category” parameter is not what I think it is.
For some unknown reason, this parameters name was changed from “LeaderboardID” to “category”. The Ansca documentation says this is “The nomenclature deviates in this case to provide consistency with our existing gameNetwork APIs”.
However, when you set up a Leaderboard om iTunes Connect there are only two fields that *could* be the “category”. Apple names these two fields:
“Leaderboard Reference Name”
“Leaderboard ID”
There is NOTHING named Category.
I am passing in the value I set in the “Leaderboard ID” field. This should be the correct value to use, but since my high scores are not posting there must be something wrong.
Here is the actual code I am using to set the high score:
[lua]local myHighScore = 1000
function highScoreCallback()
print( “High score should have been posted” )
end
gameNetwork.request( “setHighScore”,
{
localPlayerScore = { category=“9788861”, value=myHighScore },
listener=highScoreCallback
} )[/lua]
The 9788861 value is the string I am using for my “Leaderboard ID”. The reason I am using this instead of a reverse domain string is because it is the ID I get from OpenFeint. This allows me to keep my code consistent.
My current published app uses the dual openfeint/gamecenter approach and has NO problems setting high scores. I suspect the issue is when using the stand alone Game Center support. Either I have something wrong in the above call, or there is a bug when you opt not to use OpenFeint and just use Game Center.
Has anyone else run into this issue?
[import]uid: 16734 topic_id: 22769 reply_id: 322769[/import]