No Leaderboard or achievements

Hi,

I’m facing issue showing leaderboard values.

I have configured Itunes connect and created Leaderboard ID " XYZGamecenter". 

Coded gamenetwork.init, setHighScore, LoadScores properly and got callbacks properly.

But, issue is when I open GameCenter on Xcode Simulator: under my game I see “No Leaderboard or achievements” and no value is loaded init.

build.settings

        [“CoronaProvider.gameNetwork.apple”] =

        {

            publisherId = “com.coronalabs”,

            supportedPlatforms = { iphone=true, [“iphone-sim”]=true },

        },

Conrona Set and Load score code:

gameNetwork.request( “setHighScore”,

{

localPlayerScore = { category=" XYZGamecenter", value=val },

listener = SetHighScoreCallback

}

)

gameNetwork.request( “loadScores”,

{ leaderboard = { category = " XYZGamecenter", playerScope = “Global”,  timeScope = “AllTime”, range = { 1,5  }},listener = LoadScoreCallback }

)

Please let me know if some id needs to be added.

Hi @sudheer.dontamsetty,

Can you test this on an actual device in “sandbox” mode? Details on that is shown on this page:

https://docs.coronalabs.com/plugin/gameNetwork-apple/init.html

Best regards,

Brent

I used same code. I’m able to login,setHighScore and loadScores. but unable to see score that was set when I used 

gameNetwork.show( “leaderboards”, { leaderboard={ category=" XYZGamecenter", timeScope=“Week”, listener=onGameNetworkPopupDismissed  } } )

XYZGamecenter is my leaderboardID in iTunesconnect.

Hi @sudheer.dontamsetty,

Are you absolutely sure that the submitted score is higher than the current high score? If it’s not, Game Center will simply ignore it. I remember that I followed through a support case with another developer, and after many exchanges, they were not submitting a higher score than the one previously there.

Take care,

Brent

QUESTION:

I think you answered a problem I had Brent - with a submitted score being <= the high score in the leaderboard - nothing happens - no error and their doesn’t appear to be a return that triggers the listener function.

There is no “getHighScore” so how does one get the high score for the user from the one leaderboard so this can be tested prior to attempting to set it?

GameCenter = Apple.

Hi @lessmsios,

How about first getting the local player (ID) via “loadLocalPlayer”, then get all of the scores from a particular leaderboard, loop through them and check which scores match the player ID. Sort them (if they’re not already) and check if the score you’re about to submit is higher.

Best regards,

Brent

Sorry Guys, I was off to the work for a week and couldn’t catch your response.

I have set the value 100 higher every time I do setHighScore which is fine, but when I call 

gameNetwork.show( “leaderboards”, { leaderboard={ category=" XYZGamecenter", timeScope=“Week”, listener=onGameNetworkPopupDismissed  } } )

I’m not getting any value in the itunes popup screen.

I couldn’t understand how Corona connects to Apple Itunesconnect( XYZGamecenter ) id? 

category=" XYZGamecenter" is the only one I need to configure ? or anything else??

I see this error while loading.

Jul  4 16:21:30 assertiond[4797]: assertion failed: 14C109 12F69: assertiond + 14647 [D82D8D7B-5253-3300-B083-B6F739F68355]: 0x1

Jul  4 16:21:30.local GameCenterUIService[4838]: Failed to inherit CoreMedia permissions from 9322: (null)

Jul  4 16:21:39 assertiond[4797]: assertion failed: 14C109 12F69: assertiond + 14647 [D82D8D7B-5253-3300-B083-B6F739F68355]: 0x1

Hi @sudheer.dontamsetty,

At this time, I don’t think you can specify the “category” in that table via Corona’s Game Center plugin. The “show()” function will simply show the leaderboards… from there, the user can view scores on the various leaderboards that you’ve configured.

Alternatively, you could probably build your own customized leaderboard view using the “request()” function and various parameters, using those to pick out a specific leaderboard and then display the scores visually in the way that you wish.

Brent

Hi @sudheer.dontamsetty,

Can you test this on an actual device in “sandbox” mode? Details on that is shown on this page:

https://docs.coronalabs.com/plugin/gameNetwork-apple/init.html

Best regards,

Brent

I used same code. I’m able to login,setHighScore and loadScores. but unable to see score that was set when I used 

gameNetwork.show( “leaderboards”, { leaderboard={ category=" XYZGamecenter", timeScope=“Week”, listener=onGameNetworkPopupDismissed  } } )

XYZGamecenter is my leaderboardID in iTunesconnect.

Hi @sudheer.dontamsetty,

Are you absolutely sure that the submitted score is higher than the current high score? If it’s not, Game Center will simply ignore it. I remember that I followed through a support case with another developer, and after many exchanges, they were not submitting a higher score than the one previously there.

Take care,

Brent

QUESTION:

I think you answered a problem I had Brent - with a submitted score being <= the high score in the leaderboard - nothing happens - no error and their doesn’t appear to be a return that triggers the listener function.

There is no “getHighScore” so how does one get the high score for the user from the one leaderboard so this can be tested prior to attempting to set it?

GameCenter = Apple.

Hi @lessmsios,

How about first getting the local player (ID) via “loadLocalPlayer”, then get all of the scores from a particular leaderboard, loop through them and check which scores match the player ID. Sort them (if they’re not already) and check if the score you’re about to submit is higher.

Best regards,

Brent

Sorry Guys, I was off to the work for a week and couldn’t catch your response.

I have set the value 100 higher every time I do setHighScore which is fine, but when I call 

gameNetwork.show( “leaderboards”, { leaderboard={ category=" XYZGamecenter", timeScope=“Week”, listener=onGameNetworkPopupDismissed  } } )

I’m not getting any value in the itunes popup screen.

I couldn’t understand how Corona connects to Apple Itunesconnect( XYZGamecenter ) id? 

category=" XYZGamecenter" is the only one I need to configure ? or anything else??

I see this error while loading.

Jul  4 16:21:30 assertiond[4797]: assertion failed: 14C109 12F69: assertiond + 14647 [D82D8D7B-5253-3300-B083-B6F739F68355]: 0x1

Jul  4 16:21:30.local GameCenterUIService[4838]: Failed to inherit CoreMedia permissions from 9322: (null)

Jul  4 16:21:39 assertiond[4797]: assertion failed: 14C109 12F69: assertiond + 14647 [D82D8D7B-5253-3300-B083-B6F739F68355]: 0x1

Hi @sudheer.dontamsetty,

At this time, I don’t think you can specify the “category” in that table via Corona’s Game Center plugin. The “show()” function will simply show the leaderboards… from there, the user can view scores on the various leaderboards that you’ve configured.

Alternatively, you could probably build your own customized leaderboard view using the “request()” function and various parameters, using those to pick out a specific leaderboard and then display the scores visually in the way that you wish.

Brent