How to implement a Best Score Today leaderboard using Game Center?

こ雲淡風輕ζ 提交于 2019-12-11 12:37:10

问题


I want to create a leaderboard in Game Center for the best scores submitted today, and I want it reset every day at midnight.

It's not hard to just create a "most recent score" leaderboard and keep track of the score for the day in the app and submit it, however my concern is that users who do not launch the app the next day will have an old score which remains in the "best score today" board until they launch it.

Is there any way to make scores expire, or only show the current scores for the day in a Game Center leaderboard?


回答1:


YOU need to do it in iTunes connect, there is ugode on Game center and leaderboards on this site: https://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/GameKit_Guide/LeaderBoards/LeaderBoards.html

EDIT: Here is explained time scope for GKLeaderboard https://developer.apple.com/LIBRARY/IOS/documentation/GameKit/Reference/GKLeaderboard_Ref/Reference/Reference.html



来源:https://stackoverflow.com/questions/20181488/how-to-implement-a-best-score-today-leaderboard-using-game-center

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!