Flying_Banana
Flying_Banana

Reputation: 2910

Cannot receive friend invites in Game center

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

Upvotes: 0

Views: 174

Answers (1)

Flying_Banana
Flying_Banana

Reputation: 2910

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

Upvotes: 1

Related Questions