game-center

How to make High Score of game to be saved on Leaderboard, with Swift?

 ̄綄美尐妖づ 提交于 2019-12-21 20:47:07
问题 I made a game using SpriteKit and Xcode 7 beta. I tried to put GameCenter and Leaderboard but the problem is that the score in leaderboard won't change it stay all the time 0 (High Score of game won't save in Leaderboard) and I don't know how to fix it. I'm using 3 different files: GameScene.swift , GameViewController.swift , and PointsLabel.swift . GameScene.swift func addPointsLabels() { let pointsLabel = PointsLabel(num: 0) pointsLabel.position = CGPointMake(30.0, view!.frame.size.height -

Game Center inviting friends programmatically

ぃ、小莉子 提交于 2019-12-21 17:55:49
问题 I'm facing difficulty inviting a friend to the match. GKMatchRequest *request = [[[GKMatchRequest alloc] init] autorelease]; request.minPlayers = 2; request.maxPlayers = 2; request.playersToInvite = [NSArray arrayWithObjects: @"G:1102359306",nil ]; // GKMatchmakerViewController *mv = [[GKMatchmakerViewController alloc] initWithMatchRequest:request]; // [self presentModalViewController:mv animated:YES]; [[GKMatchmaker sharedMatchmaker] findMatchForRequest:request withCompletionHandler:^

How to run iphone GameCenter app from my app?

非 Y 不嫁゛ 提交于 2019-12-21 13:06:13
问题 I think the best way and may be only way is using the URL schemes with [[UIApplication sharedApplication] openURL:...]. But I can't find URL scheme for game center.. 回答1: You can launch the Game Center app by using the gamecenter: URL scheme: [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"gamecenter:"]]; 回答2: In iOS 6.0 there's a new way quite cool to show Game Center using GKGameCenterViewController . For using it your view controller must acts as a delegate to the

Sandbox Game Center Turn Event Notifications Not Consistent

拟墨画扇 提交于 2019-12-21 05:30:22
问题 I'm making a turn-based game, using the Game Center Turn-Based Gaming functionality. I'm using the simulator and my iPhone to test notifications of turn events. The results are very inconsistent. About 75% of the time when I make a move on the simulator and pass the turn I don't get any notifications on my iPhone. It seems that this function doesn't get called: handleTurnEventForMatch:didBecomeActive: I set the GKEventHandlerDelegate in the code that authenticates the local user and it seems

Crash if backgrounding cocos2d 2.1 app in iOS7 while watching Game Center screens (leaderboard, achievement)

别来无恙 提交于 2019-12-21 04:27:11
问题 I have a 100% reproducible crash here. Crash if backgrounding cocos2d 2.1 app in iOS7 while watching Game Center screens (leaderboard, achievement). It crashes instantly when pushing the home button. Crash on line 275 in CCGLView.m: if(![_context presentRenderbuffer:GL_RENDERBUFFER]) The itching thing is, I downloaded a fresh copy of official cocos2diphone 2.1 the other second, installed its templates and ran the staple application after hooking it up to the same app id as my problematic app

Drawing Game Center like tableview cells

半城伤御伤魂 提交于 2019-12-21 02:42:10
问题 I've now added a bounty which will be awarded to anyone who can take the three images below and produce a working implementation of a UITableView that mimicks the look and feel of the one found in Game Center on the Games tab. The implementation must use a non-grouped tableview but demostrate each of the four cell variants (top, middle, bottom and single) Can anyone shed any light on how Apple achieve the Game Center tableview cells which appear on the Games tab? I'm specifically referring to

GameCenter: endTurnWithNextParticipants not advancing

一世执手 提交于 2019-12-20 06:26:56
问题 In the sandbox environment, I'm having trouble advancing a turnbased match to the next player. Initial conditions: Player A and Player B on Device A and Device B, respectively. Both logged into the sandbox Both players can see each other's GC status message Player A creates a match and invites player B Player A ends the turn In my "end turn" function I do the following: NSLog(@"size = %ld", updatedMatchData.length); //move the current player to the bottom of the list NSMutableArray

Trouble Using the new rematchWithCompletionHandler method from Game Center

纵然是瞬间 提交于 2019-12-20 03:36:14
问题 I am making a turnbased game using the gamecenter api. I wanted to make a one press button to rematch players so they don't have to go through the gamecenter view controllers and re invite the same player. In this question iOS Game Kit Turn Based Match Programatic Rematch the asker notes later on that ios 6.0 makes this really easy using rematchWithCompletionHandler. I have tried to use this in my game and have only gotten unkown selector errors or NSErrors saying that the match I am trying

How do I reply to a GKTurnBasedExchange? GKLocalPlayerListener delegate receivedExchangeReplies is called intermittently

余生颓废 提交于 2019-12-19 10:23:07
问题 There are a handful of posts discussing how Game Center's push notifications were fairly unreliable in the sandbox. However, the sandbox is obfuscated with iOS 9 so, I'm not sure why my Game Center push notifications are so unreliable. When I reply to the active exchange, the sender is rarely notified. [exchange replyWithLocalizableMessageKey:@"EXCHANGE_REPLY" arguments:@[] data:data completionHandler:^(NSError *error) { if (error) { NSLog(@""); } }]; On the senders device, if I refresh the

Is there any web api for Apple's Game Center? [closed]

我与影子孤独终老i 提交于 2019-12-18 17:27:14
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . I have a website. I was wondering if Apple exposed its Game Center data via a web api. If would be cool if I could show users their