Skip to content

Instantly share code, notes, and snippets.

@Majirefy
Created March 20, 2017 04:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Majirefy/ce3236a3e866808b57e222979d1df3a3 to your computer and use it in GitHub Desktop.
Save Majirefy/ce3236a3e866808b57e222979d1df3a3 to your computer and use it in GitHub Desktop.
GKScore gkScore = GKScore.alloc();
gkScore = gkScore.initWithLeaderboardIdentifier("my.identifier");
gkScore.setValue(42);
NSArray<GKScore> nsArray = (NSArray<GKScore>) NSArray.arrayWithObject(gkScore);
GKScore.reportScoresWithCompletionHandler(nsArray, new GKScore.Block_reportScoresWithCompletionHandler() {
@Override
public void call_reportScoresWithCompletionHandler(NSError nsError) {
if (nsError != null) {
//submitted score not successfully
} else {
//submitted score successfully
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment