gamekit

Achievement order in default game center view controller

牧云@^-^@ 提交于 2020-01-06 16:01:29
问题 Is there a way to control the order achievements are shown in the Game Center achievement view controller (GKAchievementViewController)? Currently they are showing up in the order I created them in iTunes Connect. I did see that it is also possible to import all the achievement info for use in a custom achievement viewer where I could set the order myself, but I would prefer to just use the already existing viewer if possible. 回答1: You can re-order the achievements in iTunes Connect. Does

Achievement order in default game center view controller

一世执手 提交于 2020-01-06 16:01:26
问题 Is there a way to control the order achievements are shown in the Game Center achievement view controller (GKAchievementViewController)? Currently they are showing up in the order I created them in iTunes Connect. I did see that it is also possible to import all the achievement info for use in a custom achievement viewer where I could set the order myself, but I would prefer to just use the already existing viewer if possible. 回答1: You can re-order the achievements in iTunes Connect. Does

GKTurnBasedEventListener could not be set to delegate of my ViewController?

早过忘川 提交于 2020-01-05 07:07:18
问题 In objC the syntax written by Rawendrich for GKTurnBasedEventListener , which was GKTurnBasedEventHandler there at that time, now changed by Apple is as below. if (!gameCenterAvailable) return; void (^setGKEventHandlerDelegate)(NSError *) = ^ (NSError *error) { GKTurnBasedEventHandler *ev = [GKTurnBasedEventHandler sharedTurnBasedEventHandler]; ev.delegate = self; }; NSLog(@"Authenticating local user..."); if ([GKLocalPlayer localPlayer].authenticated == NO) { [[GKLocalPlayer localPlayer]

Is there any way to call saveCurrentTurnWithMatchData without sending a push notification?

安稳与你 提交于 2020-01-04 08:22:52
问题 I have a Game Center game that allows players to make multiple moves per turn. In iOS 6, Apple implemented a great feature in saveCurrentTurnWithMatchData that allows you to do just that- it saves the data to game center to prevent cheating by repeatedly redoing a move for instance, without advancing to the next player. The problem is, I have discovered that this actually triggers the same Push Notification taht gets sent when the player does end their turn. So other players in the game will

Is there any way to call saveCurrentTurnWithMatchData without sending a push notification?

限于喜欢 提交于 2020-01-04 08:22:04
问题 I have a Game Center game that allows players to make multiple moves per turn. In iOS 6, Apple implemented a great feature in saveCurrentTurnWithMatchData that allows you to do just that- it saves the data to game center to prevent cheating by repeatedly redoing a move for instance, without advancing to the next player. The problem is, I have discovered that this actually triggers the same Push Notification taht gets sent when the player does end their turn. So other players in the game will

GameKit Turn-based listener is not reliably called when matchData changes

吃可爱长大的小学妹 提交于 2020-01-03 02:41:10
问题 I am using Game Center turn-based matches for my card game. It feels like a good fit because people want to check their email or write a text sometimes between turns. Some users have said that they do really want to be able to have a very asynchronous playing experience. For the people that are keeping the game open between their turns, I want to update the screen to reflect things that the other players are doing on their turns. I have set up a listener on GKLocalPlayer that responds to

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

▼魔方 西西 提交于 2020-01-02 19:31:07
问题 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

Save game data into iCloud via GameKit

て烟熏妆下的殇ゞ 提交于 2020-01-02 03:59:24
问题 I'm trying to save game's data to iCloud via next code: GKLocalPlayer *localPlayer = [GKLocalPlayer localPlayer]; [localPlayer saveGameData:[NSData dataWithBytes:rawData->data() length:rawData->size()] withName:[NSString stringWithUTF8String:fileName.c_str()] completionHandler:^(GKSavedGame *savedGame, NSError *error) { if (error == nil) { DebugLog(@"Snapshot successfully saved"); } else { DebugLog(@"saveSnapshot error: %@", error.description); } }]; But getting error message: The requested

Gamekit how to do p2p wifi connection in iphone

冷暖自知 提交于 2020-01-01 19:35:15
问题 I have to implement multiplayer game in which I am doing p2p communication using both bluetooth and WIFI. Specially for iphone 1G I have to do connection via WIFI. but in picker default connection type is bluetooth. So how to set it to WIFI. Can anyone suggest sample codes for WIFI connection. except GKtank. Thanks in advance. 回答1: Hassan’s answer is wrong. GameKit’s peer-to-peer model can be used in two ways. The Bluetooth classes (that work with PeerPicker, etc.) basically implement Bonjour