In my GKTurnBasedMatch, if a player quits the turn is then passed onto the second player. As this is only a two player game, I automatically make them win upon receiving the notification.
But for some reason, the App Icon badge is still showing 1 notification? I'm not sure why this hasn't dismissed?
Here's what I run when the notification of the other player quit comes through:
func CheckForWin (matchToCheck: GKTurnBasedMatch) {
for opponent in matchToCheck.participants {
if opponent.matchOutcome == .quit {
matchToCheck.currentParticipant?.matchOutcome = .won
matchToCheck.endMatchInTurn(withMatch: Data()) { (error) in
// All Done, load the matches again...
}
}
}
}