Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I am using Game Center in my game for iPhone in IOS 6. I have a tableview with a list of GameCenter´s friends . When I click a friend name, this friend recieve anotificatión (Game Center Notification) in her phone asking if he want to play the game against me. I am using my custom view all the time. I am wondering how the other user can accept or reject the invitation to play the game. Can I have a uialertview telling YES or NOT, and if the user say yes create a new game with this two player using the following code?

GKMatchRequest *request = [[GKMatchRequest alloc] init];
request.minPlayers = 2;
request.maxPlayers = 2;
request.playersToInvite = [NSArray arrayWithObject:playerC_id];
[[GKMatchmaker sharedMatchmaker] addPlayersToMatch:myMatch matchRequest:request completionHandler:nil];

I don´t know if this is possible. I would prefer another solution, having a list of all the GKInvite that a user recieved for their friends. And with this list the user should be able to accpet or delete invitation. If the user accept the invitation the game will start.

How other apps manage game center invitation to play?How they accept or reject?When does the game start, when the player send an invitation to play or when the other player accept invitation?When is consider that a GKInvite is accepted?How can I get the list of GKInvite that I have?

Any solution to this issue?Any good book or tutorial about how to manage Game Center invitations?

share|improve this question
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.