game-center

GKLocalPlayer authentication not working, but isAuthenticated returns YES (Game Center sandbox)

我怕爱的太早我们不能终老 提交于 2019-12-23 15:29:36
问题 I'm working on integrating turn based matches in my game and a few days ago I started getting weird errors from the GameKit API saying that the local player is not authenticated, even though he is. When I launch the app, the authenticateHandler is called, the view controller is displayed and after entering the password, the authenticaHandler is called again and the local player seems to be authenticated. isAuthenticated returns YES . But as soon as I start using any of the GameKit APIs like

Game Center App Update Leaderboards stay the same?

爱⌒轻易说出口 提交于 2019-12-23 02:35:06
问题 When I go to update my app, will the old leaderboards that I created in previous versions stay the same in future updates for my app or will I have to create new leaderboards to follow with every update? 回答1: They'd stay the same unless you did anything explicitly. Just don't do anything and push the update. 来源: https://stackoverflow.com/questions/26939057/game-center-app-update-leaderboards-stay-the-same

IPhone - Game Center's choose Leaderboard screen - how can it be displayed?

旧城冷巷雨未停 提交于 2019-12-23 01:58:28
问题 As I go through apple documentation, I can't see a way to open Game Center where the first screen is the where the user can choose a leaderboard. I know I can open a specific leaderboard screen , but I want to open the screen that let the user choose one. is that possible ? This is my code currently: GKLeaderboardViewController *viewController = [[GKLeaderboardViewController alloc] init]; viewController.leaderboardDelegate = self; // Present leaderboard with the user's options saved from

How To submit my time of win game in game center in ios

倾然丶 夕夏残阳落幕 提交于 2019-12-22 11:38:25
问题 how to post/Submit my time in game center in iOS acutely i am complete my game with in 2 mint and Submit my time game center 02.00 and acutely leaderboard save time like this 0.00.02 i want submit my time look like in leaderboard 0.02.00 currentScore=02.22; [[GameCenterManager sharedManager] saveAndReportScore:currentScore leaderboard:leaderboardNameID sortOrder:GameCenterSortOrderLowToHigh]; 回答1: The score parameter is an integer, so you should be tracking the number of seconds as the score,

Swift Displaying Game Center Leaderboards

风流意气都作罢 提交于 2019-12-22 11:08:36
问题 Right now I am trying to make a leaderboard I created show up. The player is authenticated just fine, but when the game center window opens it is very strange. Here is a picture: Here is the code I am using to display this image: override func touchesBegan(touches: NSSet, withEvent event: UIEvent) { self.showLeaderboard() } func showLeaderboard() { var leaderView = UIViewController() var leaderViewController = GKGameCenterViewController(rootViewController: leaderView) leaderViewController

How authenticate a local player with swift?

大憨熊 提交于 2019-12-22 10:53:22
问题 I'm trying to integrate game center to my game and create a leaderboard. I already create the leaderboard on iTunes Connect, enable the game center and create a sandbox tester. Despite all I have this error : not able to authenticate fail error is nil This is my error println (see my code) Did I miss something ? Here the code of my gameViewController: import UIKit import SpriteKit import AVFoundation import iAd import GameKit var defaults = NSUserDefaults() var highscore = defaults

Maximum size of GKTurnBasedMatch matchData

北城余情 提交于 2019-12-22 10:45:35
问题 I've been searching for a definitive answer on this, but I get some inconsistent answers. Apple docs state 64k bytes. However, online I find multiple sources that say 4k bytes is the max. Is this a difference between iOS 5 and iOS 6? 回答1: It was 4KB, now its 64KB. Source: https://developer.apple.com/news/index.php?id=02012012a 回答2: Definative, or not, but I think that the previous limit was 4 kB, and that that limit now has been raised to 64k. Not 100% sure, though. 回答3: There is a read only

Underlying view disappears during game-center authentication

扶醉桌前 提交于 2019-12-22 01:36:15
问题 I have an iOS application that I'm just starting to implement game center support for. I call the authenticateWithCompletionHandler method during loadView for my main (root) view controller. My main view displays, and shortly later the "sign in to game center" dialog appears exactly as expected. If "Create New Account" is selected, the game center "New Account" pop-over dialog displays in the middle of the screen (this is on an iPad) -- but my underlying main menu disappears. Underneath the

GameCenter not updating leaderboard

允我心安 提交于 2019-12-21 23:54:40
问题 Using the sandboxed Gamecenter. No matter what I do the scores never appear in a leaderboard. I am using the following code: - (void)scoreReported: (NSError*) error { NSLog(@"%@",[error localizedDescription]); } - (void)submitScore{ if(self.currentScore > 0) { NSLog(@"Score: %lli submitted to leaderboard %@", self.currentScore, self.currentLeaderBoard); [gameCenterManager reportScore: self.currentScore forCategory: self.currentLeaderBoard]; } } And scoreReported doesnt produce an error, yet

Game center facebook like

落爺英雄遲暮 提交于 2019-12-21 21:21:02
问题 So today i started developing with the new iOS 6 SDK and noticed that my game has a new Facebook Like button in Game Center(which is greyed out because i didn't specify anything on it yet). So my question is, how can i put a link of a facebook page behind that "Like" button? My iPhone game has a facebook page already btw. Thanks already, 回答1: Hope it is not too late. Just watched one of WWDC videos and they said, if someone will click the like button, it'll means that person like the game and