When sending an invitation with your own custom interface, you install an invitee response handler:
request.inviteeResponseHandler = ^(NSString *playerID, GKInviteeResponse response) {
NSLog(@"INVITEE ANSWERED: %d", response);
};
From the invitee point of view, they receive a GKInvite
object. If they start match using this object, then the inviter will receive a GKInviteeResponseAccepted
value in their response handler.
One type of response is GKInviteeResponseDeclined
, implying that there is a way to decline a GKInvite
object. How can the invitee, programmatically, decline an invitation?
iOS 7.
For a GKTurnBasedMatch
, you can call declineInvite
right on the match itself!
God knows why they didn't make it that easy with GKMatch
. I don't know how to do this for a regular GKMatch
, which is maddening.
Best of luck!