game-center

Only one result showing in Game Center leaderboard sandbox - normal?

爱⌒轻易说出口 提交于 2019-12-12 18:32:50
问题 I'm getting results to show in the leaderboard in sandbox mode, but I expected each result to appear. Only one result is showing. Is that normal? The sort option to sort from highest to lowest seems to imply multiple results should show up. What does show up is my high score, which does update if the score is surpassed. Only one result shows whether I present a VC thus: - (void) presentLeaderboards { GKGameCenterViewController* gameCenterController = [[GKGameCenterViewController alloc] init];

Delete GameCenter Leaderboard - iTunes Connect

独自空忆成欢 提交于 2019-12-12 18:09:24
问题 My game currently has four leaderboards for differently difficulties, however this is going to change in a new update. I no longer want to make use of all of these, but only one. How can I setup the new version to only use this new leaderboard and have the other hidden so they can't be seen by the user? Thanks. 回答1: According to iTunes Connect: Once a leaderboard has gone live for any version of your app, it cannot be removed. 回答2: You may update your game without having any pointers to the

GameKit GKMatchMaker inviteHandler deprecated in iOS7, what is the replacement?

房东的猫 提交于 2019-12-12 15:13:27
问题 [GKMatchmaker sharedMatchmaker].inviteHandler is deprecated in iOS 7, yet the GameKit guides still say to set it up that way. Does anyone know what we're supposed to be using for iOS 7 real time game invites? There are new classes / methods for several listener classes, but none address this specifically that I have seen. 'inviteHandler' is deprecated: first deprecated in iOS 7.0 回答1: It looks like the intended replacement is the GKInviteEventListener protocol. You can see a reference to it

Leaderboard doesn't add in the screen cocos2d

柔情痞子 提交于 2019-12-12 15:04:30
问题 I used the code below to show the Leaderboard but all i got it the console this cocos2d: surface size: 480x320 the code: - (void)showLeaderboardForCategory:(NSString *)category { // Only execute if OS supports Game Center & player is logged in if (hasGameCenter) { // Create leaderboard view w/ default Game Center style GKLeaderboardViewController *leaderboardController = [[GKLeaderboardViewController alloc] init]; // If view controller was successfully created... if (leaderboardController !=

GKTurnBasedMatch receive data

﹥>﹥吖頭↗ 提交于 2019-12-12 14:17:50
问题 I am trying to implement a turn-based app, and there is no problem with sending turn data, but I see no way of receiving data automatically. So far, I have found out that much: There is a GKTurnBasedEventHandlerDelegate -protocol. It is easy to implement, but where do I set that object to be a delegate of whatever it has to be a delegate of? It does not seem to be a delegate of GKTurnBasedMatch , or GKTurnBasedMatchmakerViewController , or GKMatchMaker . There is also a method of

How to solve inviting friend over game center?

你说的曾经没有我的故事 提交于 2019-12-12 12:27:39
问题 I am working on a multiplayer game through game center and I am having one problem. When I try to invite one of my friends I get failed status. I have tried with simulator and iphone and with two iphones and always the same problem. I have searched a solution for my problem and found out that there are many developers with this problem. I am using iOS 6 and app is still in production so it is in sandbox. I am using same code like is on Ray Wenderlich tutorial - CatRace (there have too people

load Game Center friends and their scores into UITableView

别说谁变了你拦得住时间么 提交于 2019-12-12 09:23:54
问题 So I was wondering after reading the apple docs(https://developer.apple.com/library/ios/documentation/GameKit/Reference/GKLeaderboard_Ref/Reference/Reference.html#//apple_ref/occ/instp/GKLeaderboard/category) how would one create a UITableView and fill it with the localPlayers Game Center friends and there scores in a specific leaderboard. I know how to get the friends list and friends scores individually by using the loadScoresWithCompletionHandler: method. Edit: So far I got this to get

Adding Game Center Leaderboard

旧城冷巷雨未停 提交于 2019-12-12 02:15:59
问题 I am new to Swift and am having trouble adding a Game Center leaderboard into my Sprite Kit game. I created a button for the leaderboard but it is in an SKScene and it seems that the code for Game Center needs to be inside a View Controller? I have added the code into my single View Controller, but now I'm not sure where to go. Again, I am very new to this and completely lost -- any help would be greatly appreciated. 回答1: you could create a cocoa touch class with the UIViewController Subclass

Sending data error?

五迷三道 提交于 2019-12-11 23:39:56
问题 typedef struct _protocol1 { int type; CGPoint pos; } Protocol1; -(void)sendData { NSError *error; Protocol1 msg; msg.pos = ccp(100,100); msg.type = 1; NSData *packet = [NSData dataWithBytes:&msg length:sizeof(Protocol1)]; [self.myMatch sendDataToAllPlayers: packet withDataMode: GKMatchSendDataReliable error:&error]; if (error != nil) { NSLog(@"error"]); } } That is a chunk of code from my project. And I'm getting an error. However, I am unsure how to retrieve more information to help me debug

UIView won't cast to SKView

梦想的初衷 提交于 2019-12-11 22:52:16
问题 I've been trying to implement Game Center in my Sprite Kit game, but every time I try to present the leaderboard... -(void)showLeaderboard:(UIViewController*)gcvc { GKGameCenterViewController *leaderboardController = [[GKGameCenterViewController alloc] init]; if (leaderboardController != NULL) { leaderboardController.leaderboardIdentifier = @"Game_Leaderboard"; leaderboardController.viewState = GKGameCenterViewControllerStateLeaderboards; leaderboardController.gameCenterDelegate = self;