When loading the default leaderboard, it seems you have to detect whether the user is running iOS 6.0 or 7.0.

For 7.0, you use loadDefaultLeaderboardIdentifierWithCompletionHandler.

For 6.0, you use loadDefaultLeaderboardCategoryIDWithCompletionHandler.

But what if the user is running 5.0 or even 4.0?

有帮助吗?

解决方案

Back in the iOS 5 days, you didn't retrieve the default category ID. You simply initialized a score with -[GKScore init] and the score was submitted to the default category. To retrieve the scores in the default category, you supplied the category ID via -[GKLeaderboard setCategory:].

I'd link to the iOS 5 docs, but I can't find the individual pages online. If you like, you can download the docset here. (Unarchive it with xar.)

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top