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 8912249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:09:10+00:00 2026-06-15T04:09:10+00:00

We’ve been having trouble with this issue for a while, and just cannot find

  • 0

We’ve been having trouble with this issue for a while, and just cannot find the answer to it in the docs or online searches..

Our iOS game is based on OpenGL ES, and we are implementing GameCenter turn based gaming. The following code shows a matchmaking UI for creating a turn based match. This code works fine on my iPad 1 and iPad 3. However, it will not work on my iPhone 4S!

[ UPDATE: ] We were using a UIWindow at the top of the View hierarchy, with a GL View / Layer as a sub view. This obscured the new view when it was presented. I can see this window now by adding a UIView into the main window, and the GL view as a child of it. However, I still cannot interact with this view..

This code is from a .mm file where we mix C++ and Objective-C code.

// Configure the match making view, with our own delegate
GKTurnBasedMatchmakerViewController *mmvc = 
[[GKTurnBasedMatchmakerViewController alloc] 
 initWithMatchRequest:request];    
mmvc.showExistingMatches = YES;


// Uses our own delegate.
if(!g_pTurnBasedDelegate)
{
    g_pTurnBasedDelegate = [[TurnBasedDelegate alloc] init];
}

mmvc.turnBasedMatchmakerDelegate = g_pTurnBasedDelegate;

// Get the main window's root controller and instruct it to show the match making delegate.
if(g_Env && g_Env->m_pWindow)
{
    RefPtr<WindowIOS> pIOSWin = ref_static_cast<WindowIOS>(g_Env->m_pWindow);

    UIWindow * pUIWin = (UIWindow *)pIOSWin->GetHandle();
    UIViewController * pController = [pUIWin rootViewController];


    if(pController)
    {
        g_pRootViewController = pController;
    }

}

if(g_pRootViewController)
{
    [g_pRootViewController presentViewController:mmvc animated:YES completion:nil];
}
  • 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-06-15T04:09:11+00:00Added an answer on June 15, 2026 at 4:09 am

    Came back to this issue after a while. The problem was not with the Game Center controllers, but rather with how we were setting up our main application views. This just happened to work on iPad, but not on iPhone.

    For our application, we need to initialize the whole view hierarchy in code instead of using a NIB / Storyboard.

    Our old initialization steps were:

    1. UIWindow init and make key.
    2. UIWindow addView (our OpenGL window).
    3. UIWindow addView (a touch responder UIView).
    4. UIWindow rootViewController = [[ViewController alloc] init];

    Adding our views directly to UIWindow would impede the functionality of View Controllers and cause undefined behavior on iPhone vs. iPad.

    Our new initialization steps (to fix these issues if anyone is having them):

    1. UIWindow init and make key.
    2. UIWindow rootViewController = [[ViewController alloc] init];
    3. rootViewController.view = [[GLAndTouchView alloc] init];

    Hopefully, anyone stuck with the same problem will find this useful.

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
Seemingly simple, but I cannot find anything relevant on the web. What is the
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
Let's say I'm outputting a post title and in our database, it's Hello Y&#8217;all
I have a jquery bug and I've been looking for hours now, I can't
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text

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.