game-center

“This game is not recognized by Game Center” error

若如初见. 提交于 2019-12-07 04:26:42
问题 I'm struggling to get past the first stage of getting Game Center integration to work. I've got this far: I've created a new, clean app, added the GameKit headers and the basic authenticateWithCompletionHandler: method in the app delegate. Starting the app in the simulator brings up the login dialogue. If I create a NEW account via the login dialogue, then that user gets authenticated and the app loads successfully. If I attempt to log in with that account a second time, OR use an account

GameCenter Invitation Handler

风流意气都作罢 提交于 2019-12-07 02:37:18
问题 trying to implement a multiplayer. Using the sample from Game Center - Sending and receiving data. Everything seems okay, but in apple documentation there is also said about invitation handler. [GKMatchmaker sharedMatchmaker].inviteHandler = ^(GKInvite *acceptedInvite, NSArray *playersToInvite) { // Insert application-specific code here to clean up any games in progress. if (acceptedInvite) { GKMatchmakerViewController *mmvc = [[[GKMatchmakerViewController alloc] initWithInvite:acceptedInvite

Game Center Matchmaking GKTurnBasedMatch has significant lag (~1 min)

大憨熊 提交于 2019-12-07 02:21:47
问题 I'm implementing a turn-based game with multiplayer mode through gamecenter. I have 2 devices (1 ipad, 1 iphone) to test in sandbox mode which were working fine but lately it has started to struggle in auto matchmaking process. After I send the first turn from one user, the other device doesn't immediately recognize that game but opens up its own fresh game. Before it was able to immediately spot the game started in the other device and matchmaking was fairly straightforward. And I don't

iOS Game Kit Turn Based Match Programatic Rematch

不想你离开。 提交于 2019-12-07 01:53:55
问题 I have a 2-player, iOS turn-based game that uses the game center and GKTurnbasedMatch. Is there a way to programmatically rematch an opponent after a match has finished? I would like to give the players one-button access to starting a new match with each other. If there is not a one button approach, what are some potential alternatives? 回答1: Indeed it appears a full programmatic solution is being ignored by Game Center. A pain, no doubt. Try the following in your @selector(doRematchTap)... or

Any way to programmatically reset leaderboards?

家住魔仙堡 提交于 2019-12-07 01:36:52
问题 As I look into documentation of GKScore and GKLeaderboard, there is no way to reset scores reported by player to particular leaderboard in GameCenter. Am I right? This seems quite inconsistent, since it is possible to reset achievements: [GKAchievement resetAchievementsWithCompletionHandler:^(NSError *error) { ... }]; Any thoughts? 回答1: You are correct. There is no way to reset a Game Center leaderboard category or to remove a category once it's been launched in a live app. Apple did allow a

Strange Exception with GameCenter

若如初见. 提交于 2019-12-07 01:34:13
问题 I keep getting this crash report from GA and users... However i cannot reproduce this exception by testing iphone5,5s,6 with both ios7 and ios8. This issue comes nowhere when application did enter to background. The strange part is that gamecenter will call spritekit, for showing achievement banner? Does anyone has the same issue? Last Exception Backtrace: 0 CoreFoundation 0x23c99e3f __exceptionPreprocess + 127 1 libobjc.A.dylib 0x31371c8b objc_exception_throw + 38 2 CoreFoundation 0x23c9f189

Unbalanced calls to begin/end appearance transitions for <GKModalRootViewController: 0xb7e450>

依然范特西╮ 提交于 2019-12-06 20:02:26
I give up on that point, I just can't figure out what is wrong and where... Here is the problem: in my iPhone application using Cocos2d, I configured autorotation through a viewController; however, since, when Game center opens its view as the user taps on "Create new account" during the authentication, this view does not receive any touch, but the touch go to the game's view (which is hidden under the Game center view). I have tried everything I thought about, but since I did not find any callback about this Game Center View, it is hard to find a way to correct this... Here is the

iOS - issue with rematchWithCompletionHandler in Sandbox

╄→гoц情女王★ 提交于 2019-12-06 16:44:28
I have the following code: if(tappedItem.match.status == GKTurnBasedMatchStatusEnded){ [[GameKitHelper sharedGameKitHelper] findMatchWithViewController:self delegate:self debug:false invite:tappedItem.player]; return; NSLog(@"Participants %@", [tappedItem.match.participants description]); [tappedItem.match rematchWithCompletionHandler:^(GKTurnBasedMatch *match, NSError *error) { if (error) { NSLog(@"%@", error); } else { [[GameKitHelper sharedGameKitHelper] setMatch:tappedItem.match]; [[NSNotificationCenter defaultCenter] postNotificationName:ShowGameScreen object:tappedItem.match]; } }]; } I

fatal error: can't unsafeBitCast between types of different sizes (using gamekit)

最后都变了- 提交于 2019-12-06 15:42:12
Using GameKit Multiplayer feature (EasyGameCenter) found here: https://github.com/DaRkD0G/Easy-Game-Center-Swift Upon two players connecting I get a crash on this line let playerIDs = match.players.map { $0 .playerID } as! [String] With this in console fatal error: can't unsafeBitCast between types of different sizes Any ideas? Here is full function for easy reference: @available(iOS 8.0, *) private func lookupPlayers() { guard let match = EGC.sharedInstance.match else { EGC.printLogEGC("No Match") return } let playerIDs = match.players.map { $0 .playerID } as! [String] /* Load an array of

Xcode Linker Error?

时光总嘲笑我的痴心妄想 提交于 2019-12-06 13:34:37
I get this error: Undefined symbols for architecture i386: "_OBJC_CLASS_$_GameCenterManager", referenced from: objc-class-ref in BT_viewController.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) My Info: Ld /Users/Raoul/Library/Developer/Xcode/DerivedData/latintogopro-fbrntyvxhakjwlfaxcckdbvsvcli/Build/Products/Debug-iphonesimulator/LatinToGo.app/LatinToGo normal i386 cd /Users/Raoul/Downloads/latintogopro_v15_iOS setenv MACOSX_DEPLOYMENT_TARGET 10.6 setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms