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

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -