Turn-based matchmaking not working in iOS 10

ε祈祈猫儿з 提交于 2019-12-06 05:15:25

It appears that with IOS10, the defaultNumberOfPlayers isn't being honored.

Keep in mind that GKTurnBasedMatch has three types of players in a given match:

  • The Originator who creates the match
  • Players that were specifically invited into the match
  • Players that automatch into the match

If you look at the player status for all 4 players in the match (using your example), I suspect you will see the following results

  1. Active (the originator)
  2. Invited (the 1 person you invited)
  3. Matching
  4. Matching

If so, that would indicate that defaultNumberOfPlayers was ignored, and the match was created with a max of 4 players (1 originator, 1 invitee and 2 automatch slots).

The workaround seems to be to set the maxNumberOfPlayers to the desired cap, in this case, 2, when you create the match.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!