Question

I'm creating a live multiplayer game with 2 players through game center.

I followed Ray Wenderlich's tutorial on game center and I tried to set up the invite friends. I set up the call back just like apple said:

    if ([GKLocalPlayer localPlayer].isAuthenticated) {
        [GKMatchmaker sharedMatchmaker].inviteHandler = ^(GKInvite *acceptedInvite, NSArray *playersToInvite) {
            NSLog(@"Received invite");
            self.pendingInvite = acceptedInvite;
            self.pendingPlayersToInvite = playersToInvite;
            [self inviteReceived];
        };
    } 

I even tested whether the block property is actually set. It is.

I'm in sandbox with a simulator and an iPhone 5 both at iOS7. I couldn't receive ANY invitations (see screenshot). I enabled notification center, checked accept invitation in settings, but the block is never called. Random match worked fine though.

Fail message

Was it helpful?

Solution

Solved it by borrowing someone else's device instead of using the simulator.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top