login about faq

To prove you're not a spammer, email newuser.lgqa@gmail.com with the subject "Account Request" to request an account.


Hey Lockergnome,

I've been working on a iOS game and our users asked for Facebook support which is working right now. The only problem is that after Facebook is done and gave us the information we needed Game Center won't cooperate and during the match invite stays stuck on 'waiting...' about 30% of the times.

After the game received the Facebook request and has it's data it checks if the user is authenticated in Game Center and only if he/she is it will call the following code to create the match

-(void)createMatchWithFB:(NSString*)playerID andViewController:(UIViewController *)viewController andDelegate:(id<GCHelperDelegate>)theDelegate
{
      BOOL bResult = FALSE;
      bResult = [self isGameCenterAvailable];
      presentingViewController = viewController;
      NSLog(@"delegate: %@",theDelegate);

      if(bResult == YES)
      {
           GKMatchRequest *request = [[[GKMatchRequest alloc] init] autorelease];
           request.minPlayers = 2;
           request.maxPlayers = 2;
           request.playersToInvite = [NSArray arrayWithObject:playerID];

           if([LanguageController isEnglish])
                request.inviteMessage = @"Want to play some WordMemory?";
           else
                request.inviteMessage = @"Zin in een potje WordMemory?";
           request.inviteeResponseHandler = ^(NSString *playerID, GKInviteeResponse response)
          {
             NSLog(@"request response %@ %i",playerID,response);
          };

           GKMatchmakerViewController *mmvc = [[[GKMatchmakerViewController alloc] initWithMatchRequest:request] autorelease];
           mmvc.matchmakerDelegate = self;

           [viewController presentModalViewController:mmvc animated:YES];
      }
 }

Even though the Game Center dialog is stuck on 'waiting...' I can still start the request and the other player does get it. But the match never starts...

Here's a screenshot to farther explain what's going on, http://i.imgur.com/BSnN4.jpg the iPad tried to start the match after the iPod send the request via Facebook.

Does anyone have any idea what causes this?

Edit:

After talking to Apple directly via the Bug Report system it has been deemed as expected behaviour. Though this isn't really expected it does however rely on undocumented behaviour to work.
Game-center only accepts invites form people on Game-Center whom are friend on Game-Center with the person requesting the invite. Since there is no guarantee that the same Facebook friends are friends on Game-Center there is no guarantee that these two user can start a game together.

The support for this functionality has been removed and should not be attempted by any other developer unless Apple changes it's policy on external social network which will most likely NOT happen as their behaviour might change over time.

asked Jan 09 '13 at 05:16

nitrocrime's gravatar image

nitrocrime
3.7k7283132

closed Mar 16 '13 at 21:30

The question has been closed for the following reason "After talking to Apple directly it has been deemed 'expected behaviour' reason has been added to the question" by nitrocrime Mar 16 '13 at 21:30

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported


Tags:

×1,427
×879
×524
×456
×362
×344
×41
×14
×7

Asked: Jan 09 '13 at 05:16

Seen: 934 times

Last updated: Mar 16 '13 at 21:30