Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3617654
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T22:39:08+00:00 2026-05-18T22:39:08+00:00

I have been trying to implement Game Center multiplayer and struggling to get anything

  • 0

I have been trying to implement Game Center multiplayer and struggling to get anything beyond a GKMatchViewController.

I have two views, one is my main menu, this is where multiplayer is launched and the player gets the GKMatchViewController. Then behind this, the user doesn’t know it but the view changes to the multiplayer view where they actually play so when the GKMatchViewController is dismissed they are in the game view rather than menu.

Here I launch multiplayer (yes I am using cocos2d):

-(void)mpGo:(id)sender{
    GKMatchRequest *request = [[[GKMatchRequest alloc] init] autorelease];
    request.minPlayers = 2;
    request.maxPlayers = 2;

    [[GKMatchmaker sharedMatchmaker] findMatchForRequest:request
                                   withCompletionHandler:^(GKMatch *returnedMatch, NSError *error) 
     {
         if (error) NSLog(@"match error: %@", error);
         else if (returnedMatch != nil)
         {
             match = [returnedMatch retain]; 
             match.delegate = self; // start!
         }
     }];

    tempVC = [[UIViewController alloc] init];

    GKMatchmakerViewController *mmvc = [[[GKMatchmakerViewController alloc] initWithMatchRequest:request] autorelease];
    if (mmvc != nil)
    {
        mmvc.matchmakerDelegate = self;
        [[[CCDirector sharedDirector] openGLView] addSubview:tempVC.view];
        [tempVC presentModalViewController:mmvc animated: YES];
    }

    [[CCDirector sharedDirector] replaceScene:[CCTransitionFade transitionWithDuration:1.0 scene:[mpView node] withColor:ccWHITE]];
}

When pressing ‘Play Now’ I get this error:

match error: Error Domain=GKErrorDomain Code=2 “The requested operation has been cancelled.” UserInfo=0x2248d0 {NSLocalizedDescription=The requested operation has been cancelled.}

Then it just stays on that ‘Finding Players…’ view.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T22:39:08+00:00Added an answer on May 18, 2026 at 10:39 pm

    I never done something with GameCenter but maybe I can help anyway. When I get the error

    “The requested operation has been
    cancelled”

    in reverse geocoder I have figured out, that the app had not the time to perform the request.
    You get the error by executing findMatchForRequest:, so maybe your request variable is not set completely, check that. You can also try to put a NSLog() in first line (in the block) and look in your passed variable returnedMatch and error

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to implement remote debugging in two different scenarios both without
Hello guys, I have been trying to implement the DSUM function but failed to
Im trying to implement an Observer/Observable pattern on an EC2 instance. I have been
I have been trying all afternoon to get the jQuery Sifr Plugin ( http://jquery.thewikies.com/sifr/
I have been trying to implement a CheckBox Node Tree, where the parent nodes
I have been trying to implement hash-tables using uthash.h, following the (excellent) documentation I
I have been trying to implement Nhibernate.Linq 1.0.0.4000 together with Nhibernate 2.1.2.4000. After what
OK. So I have been trying to implement a timer. Now a very weird
I am a beginner interested in Haskell, and I have been trying to implement
I have been trying to implement 2 Seperate Contact Modals based off an original

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.