This is a follow-up to this question. If you are not receiving any callbacks to handleTurnEventForMatch:didBecomeActive:
, try the answer there.
In my game, I am only receiving turn event notifications some of the time. But if I go back to the matchMakerViewController
and re-load the match, the state is always correct.
My game uploads the turn state multiple times during each turn. Anecdotally, it seems that if the other device receives one notification for an opponent's turn, it is less likely to receive further notifications for that same turn. However, this is not 100%.
In general, my internet connection seems to work pretty well.
Any ideas what might be causing this?
I finally figured out the problem.
Alright, if you use the
GKTurnBasedMatchmakerViewController
, then it steals the delegation from your current delegate.It has probably got something like:
This makes perfect sense as the viewcontroller needs to update when changes occur from gamecenter, so it becomes the delegate for the
GKTurnBasedEventHandler
.If you want to return the delegation to your own object though you should put this line:
At the very top of all function in the
GKTurnBasedMatchmakerViewControllerDelegate
protocol.