Is there a way to update matchData in a GKTurnBasedMatch without sending out “Your Turn” push notifications?

给你一囗甜甜゛ 提交于 2019-12-01 10:29:25

Mid-turn saving has been added in iOS 6 with:

-[GKTurnBasedMatch saveCurrentTurnWithMatchData:completionHandler:]

Source: GKTurnBasedMatch Class Reference

todd412

Interestingly, to address your original question, it appears that saveCurrentTurnWithMatchData still sends out push notifications to the other players, even though the current player's turn hasn't ended!

In my opinion, this seems like a GameKit design flaw- it seems inherently misleading to have a badge show up on an opponent's app icon when it isn't yet their turn. What a bummer to open it and see that it's just a false alarm over and over!

If anyone has figured out a way to suppress these push notifications when calling saveCurrentTurnWithMatchData, I would love to hear how you did it.

UPDATE: I started a new thread to address this issue.

There shouldn't really be a reason to update the match data during the turn. None of the other players can react until their turn, so the data only needs to be passed as play transitions from one player to another.

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