Post

Replies

Boosts

Views

Activity

Reply to GKTurnBasedExchanges does not notify turn holder when the exchange is completed
Hey Frameworks Engineer , I just tested the mockup project I made for WWDC, and it does look like the backend bug has been fixed, and exchanges - finally - work as documented. Great! I'll update the Github project so it properly shows the exchange data as part of the game date, something I obviously hadn't been able to test - until now. This should get a lot more attention than it has so far, as this means trading games and all kinds of amazing game mechanics are finally supported by Game Center! Amazing and super exiting!
Feb ’21
Reply to Game Invite: got to New Message directly?
I talked to Apple at WWDC 2020 and was told that this is not possible. We cannot present the "New Message" controller directly - which the match maker shows after tapping the Invite Friends button when creating a new match. That message controller can only be created by match maker. However, as an alternative or workaround, we can integrate nicely the friends and previous player list (which we can populate with an API call) and have the player pick players from that list. This means avoiding the Match Maker and New Message altogether.
Jul ’20
Reply to How to check xcode version in code
Xcode itself causing the error? Never experienced that, but I have experienced JSON related bugs for iOS 12 that were fixed with iOS 13, so I had to use different code for older versions of iOS: if #available(iOS 13.0, *) { 		<iOS 13 and Newer Code #> } else { 		<Older Version Code #> } I had to use it again for a new project to adopt the UIScene lifecycle in a iOS 12.4 project.
Jul ’20
Reply to GKTurnBasedExchanges does not notify turn holder when the exchange is completed
No, that will not work. First of all - that would mean that the turn holder will be able to act on the exchange. Of course I already tried this, and implemented an immediate "ignore" exchange response from turn holder. Second, and more importantly, including the turn holder will still not result in the turn holder being notified when the exchange is completed. Which is the entire problem. So including the turn holder changes nothing. Finally, I managed to book a lab 1-on-1 session with Apple during WWDC, and after some investigation the Apple Tech established that the Apple server does in fact not send the notification to the turn holder if that participant isn't also the requester. Apple will fix this issue as soon as possible. Meanwhile, we should develop our game as if the notification is received. You can check my GitHub project that implements this correctly: https://github.com/Gatada/TurnBasedGameFlow
Jun ’20
Reply to gamekit
Yes, but if you only rely on GameKit, then the chat functionality will be different from what you might be used to - as I believe you’ll have to use Exchanges: You can only chat with players in a game where you participate. The turn holder will not be able to end their turn until all players have received the exchange (or it has timed-out). You may want to use a very short time-out to avoid the chat from preventing turn holder from ending their turn. However, I believe this will result in an inactive player missing the chat message - as I think the player will not receive resolved or cancelled exchanges. You may be able to restore he full chat using the exchange array associated with the match, but I’m not entirely sure about that - as I think cancelled andresolved exchanges are removed. So bottom line, you should be able to use GameKit to create a chat between participants in an ongoing game. But is could end up being a chat that doesn’t retain a full chat log.
Jun ’20
Reply to Invite players programmatically into a match
Did you look into the GKLocalPlayerListener?The critical step is to register your GameKit wrapper (the entity you have setup to receive the invite related push events) to make it receive the local player related events - including those relevant for invites:GKLocalPlayer.local.register(self)Then the handler will receive all these events - which are all part of the GKLocalPlayerListener: // MARK: GKInviteEventListener func player(_ player: GKPlayer, didAccept invite: GKInvite) { print("Did accept invite, update UI or show and start the game?") } func player(_ player: GKPlayer, didRequestMatchWithRecipients recipientPlayers: [GKPlayer]) { print("Did request match with recipients") } func player(_ player: GKPlayer, didRequestMatchWithPlayers playerIDsToInvite: [String]) { print("Did request match with players") }Hope this helps.
May ’20
Reply to Invite players programmatically into a match
Hey PBK,Not sure about the uncletr but how Go Game Connect does it in regards to multiplayer is also more ore less what I was hoping to do. Seems all I have to do is initalize the GKMatchmakerViewController with the match?But.. ideally I would skip directly to the controller that is shown when the player taps the "Invite" button. Is that possible? Should be..
May ’20