Note that there are some explanatory texts on larger screens.

plurals
  1. POGame Center invitation programatically with GKInvite list
    text
    copied!<p>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?</p> <pre><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]; </code></pre> <p>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.</p> <p>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?</p> <p>Any solution to this issue?Any good book or tutorial about how to manage Game Center invitations?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload