Wondering if anyone has come across this one. I could not find the expected behavior listed on any documentation anywhere. I do need to understand the expected behavior first though. Thanks in advance.
I can work-around it but I prefer to know what the expected functionality is supposed to be. Steps to reproduce:
-
Set up a GKTurnBasedMatch for two player turn based games
-
Players use the GKTurnBasedMatchMakerViewController view (Apple's native functionality) to manage their matches as I have not invested in a custom UI for that at this time. This is why I need to make sure all available functionality is interpreted correctly for my game players.
3. Player1 decides to remove ( by sliding right on the match and choosing remove) a current match
- Player2 correctly receives the player(_ player: GKPlayer, matchEnded match: GKTurnBasedMatch) notification . However the matchData is incorrect/incomplete. The match data is providing some elements of the match data ( custom to the match) but missing on the turn information provided via matchData at each turn. Making it seem as though Player1 quit on the very 1st turn instead of whichever turn they actually removed the match.
I can attach debug logs and code snippets to show how matchData is parsed ( simple character separators and predefined tags in string form) however,
- the same code works for every other scenario ( initiate match, accept invite, take turns, win/lose/draw etc.)
- the turn right before the remove shows correct matchData
- I checked for initialized structs etc, but the code is simply parsing matchData string first and printing it out. This where I notice the miss.
Thanks in advance.