ios6 - Get a list of all GKInvite to list them in a TableView -


i developing turn based game using game center. handle invitations play using following code::

gkmatchmaker sharedmatchmaker].invitehandler = ^(gkinvite* acceptedinvite, nsarray *playerstoinvite)     {         if(acceptedinvite != nil)         {             // match invite obtained...              nslog(@"valor de la invitacion %@",acceptedinvite);              [[gkmatchmaker sharedmatchmaker] matchforinvite:acceptedinvite completionhandler:^(gkmatch *match, nserror *error)               {                  if(match != nil)                  {                      nslog(@"match != nil: ");                   }                  else if(error != nil)                  {                      nslog(@"error: matchforinvite: %@", [error description]);                  }                  else                  {                      nslog(@"error: unexpected return matchforinvite...");                  }              }];         }     }; 

i woudl have list of gkinvite received have them in tableview, , later user decide accept invitation play game or reject it. of course using own view handle game center options.

any solution??

for turn- based games, you'll have use gkturnbasedmatchmaker instead of gkmatchmaker.

furthermore, believe you'll see gkturnbasedmatch objects games user has accepted swiping invitation.


Comments

Popular posts from this blog

Eclipse formatter for java ending braces -

ruby - Nesting modules inside of a Rails eninge gem -

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -