I'm working on a turn based iOS game using the new turn-based iOS5 API.
One of the delegate protocols you need to implement for this is GKTurnBasedEventHandlerDelegate. One of the methods to implement is handleTurnEventForMatch. This is from the Apple docs on this method:
handleTurnEventForMatch
Sent to the delegate when it is the local player’s turn to act in a turn-based match.
- (void)handleTurnEventForMatch:(GKTurnBasedMatch *)match
Parameters
match - A match object containing the current state of the match.
Discussion
When your delegate receives this message, the player has accepted a push notification for a match already in progress. Your game should end whatever task it was performing and switch to the match information provided by the match object.
Most of my game is working. I'm getting notifications of moves received via the above method. I'm also seeing badges on the app icons being updated successfully.
However, I am not getting any other system notifications when turn events come in; nothing shows up in the notification center, etc. Do I need to do something outside of GameKit to enable this? Do I need to manually send a local notification when I get handleTurnEventForMatch? The docs seem to imply not since it says above "When your delegate receives this message, the player has accepted a push notification for a match already in progress."
So this seems to imply that the player has clicked on a push notification to get this method called (but of course they never appear, so I have not!)
What do I need to do to enable push notifications in my app for turn-based events? Do I need to actually send a local notification when I receive the above method (this would seem to contradict the intent, given the verbiage of the above doc).