Menu
  • HOME
  • TAGS

How to Implement Game Center Leaderboard ID in swift

ios,xcode,swift,game-center,game-center-leaderboard

You can choose arbitrary (unique) strings as leaderboard IDs and assign them in iTunes Connect. Mine look like this: leaderboard.identifier = "com.domain.app.leaderboard". ...

Corona SDK - iOS Game center score error, decimal comma

ios,lua,corona,game-center,game-center-leaderboard

The score must be an integer even if you set up a Fixed Point - To 3 Decimals. If you submit 1234 you would get 1.234 To fix you problem, just multiply your score with 1000 and then submit....

Game Center leaderboard shows one result

ios,objective-c,sprite-kit,game-center,game-center-leaderboard

I've had this issue before and after much searching it seems to be an error with sandbox accounts. I split my table into highest of all time, highest today and highest friend and in each case other higher scores from my other sandbox accounts were ignored. When I added another...

GKLeaderboard in SpriteKit?

sprite-kit,game-center,leaderboard,game-center-leaderboard

presentModalViewController was deprecated in iOS 6. GKLeaderbardViewController is deprecated in iOS 7. You an refer to this: What should I use instead of deprecated GKLeaderboardViewController in iOS7?...

GameCenter not refreshing

xcode,swift,game-center-leaderboard

Thanks to Bob Gilmore, your answer are quite right I thinks. GameCenter did refresh after two or more user update their score. In order to refresh GameCenter, the threshold are likely to be three or four user.

iOS GameCenter: Send scores from server

ios,unity3d,game-center,game-center-leaderboard

In short: no. Access to Game Center has to go through the GameKit.framework which is only available on iOS and OS X. Furthermore, players need to be authenticated. Therefore a single server can't send scores etc. on behalf of the players even if it were running on OS X because...

how do I implement GameCenter Leaderboard? [closed]

swift,sprite-kit,game-center,game-center-leaderboard

First you must authenticate the player: var localPlayer = GKLocalPlayer.localPlayer() localPlayer.authenticateHandler = {(viewController : UIViewController!, error : NSError!) -> Void in if ((viewController) != nil) { self.presentViewController(viewController, animated: true, completion: nil) }else{ println((GKLocalPlayer.localPlayer().authenticated)) } } Then you can open the leaderboard: func showLeaderboard() { var gcViewController: GKGameCenterViewController = GKGameCenterViewController() gcViewController.gameCenterDelegate...

Can't see public leaderboard from google play

google-plus,public,game-center-leaderboard

If your leaderboard dosent support the android language you wont be able to see the "social-all" toggle, or the public leaderboard. To fix this you must add the language to the service. In the console, go to Game services, select your game,go to Game details,click on Manage translations and select...

Showing leaderboard crashes app because showViewController isn't supported

ios,swift,ios7,ios8,game-center-leaderboard

If your app targets iOS 7.x, you should use the following code: self.presentViewController(gcViewController, animated: true, completion: nil) instead of: self.showViewController(gcViewController, sender: self) ...

Game Center entitlement

ios,game-center,game-center-leaderboard

Yes. Your app is most likely to be rejected, and you will have a message in the Resolution Center asking you to enable the Game Center entitlement. So don't lose more time and do it now.

Displaying a Game Center Leaderboard in SpriteKit

swift,sprite-kit,game-center,gamekit,game-center-leaderboard

Include the GKGameCenterControllerDelegate protocol within your class. class ViewController: UIViewController, GKGameCenterControllerDelegate This method dismisses the Game Center view when "Done" is tapped: func gameCenterViewControllerDidFinish(gcViewController: GKGameCenterViewController!) { self.dismissViewControllerAnimated(true, completion: nil) } This function includes the code that is needed to display the leaderboard: func showLeaderboard() { // declare the Game Center...

Connecting Itunes Connect To Code For GameCenter Leaderboard

swift,sprite-kit,itunesconnect,game-center,game-center-leaderboard

Firstly add the GKGameCenterControllerDelegate to your class: class viewController: UIViewController, GKGameCenterControllerDelegate { ... } This is the code you need to use to authenticate the player: func login() { println("Game Center Login Called") let localPlayer = GKLocalPlayer.localPlayer() // Handle the authentication localPlayer.authenticateHandler = {(Home: UIViewController!, error: NSError!) -> Void in...

Game Center in Swift Sprite Kit

ios,iphone,swift,xcode6,game-center-leaderboard

You can just call it like that, if you are in a UIViewController already. But if you want to show an UIViewController from your SKScene you should access the rootViewController and present the controller from there: self.view?.window?.rootViewController?.presentViewController(yourViewController, animated: true, completion: nil) ...

how report highscore in Game center with swift

iphone,swift,ios8,xcode6,game-center-leaderboard

It's best practice to add your app id to the leaderboard identifier. I had trouble not getting it to work before then. You may be having the same troubles. Make a test leaderboard named "com.whateverName.55009943" and update your code. See if that works like it did for me. If you...

Saving a highscore for Game Center in Swift 2

ios,game-center,xcode7,swift2,game-center-leaderboard

According to the prerelease documentation, the method signature has changed to be: class func reportScores(_ scores: [GKScore], withCompletionHandler completionHandler: ((NSError?) -> Void)?) This differs from the old documentation which stated: class func reportScores(_ scores: [AnyObject]!, withCompletionHandler completionHandler: ((NSError!) -> Void)!) Note the change to an optional NSError parameter as well...

Undefined behaviour of GameCenter leaderboards with SpriteKit

sprite-kit,game-center,game-center-leaderboard

I solved it via editing exception breakpoint from all to Objective-C exceptions . Tnx @LearnCocos2D for the answer