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

  • Home
  • SEARCH
  • 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 3751634
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T09:06:09+00:00 2026-05-19T09:06:09+00:00

Hi all Working on a universal build for an iphone/ipod/ipad app. I was trying

  • 0

Hi all
Working on a universal build for an iphone/ipod/ipad app. I was trying to get game center working within this app. I now have the game center working on the ipad but for some reason it still wont work on the ipod/iphone and i have no idea why.

highScoreVC=[[UIViewController alloc] init];

    GKLeaderboardViewController *leaderboardController = [[[GKLeaderboardViewController alloc] init] autorelease];
    if (leaderboardController != nil)
    {
        leaderboardController.leaderboardDelegate = self;
        [[[CCDirector sharedDirector] openGLView] addSubview:highScoreVC.view];
        [highScoreVC presentModalViewController:leaderboardController animated: YES];
    }

this is my code for displaying the leaderboard and it does work everytime for ipad but as i said not for other devices. the code is still being called the same as for ipad so i have no clue why it is not displaying. any ideas why this would be? cheers

  • 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-19T09:06:10+00:00Added an answer on May 19, 2026 at 9:06 am

    ok i got it working in the end.
    cocos2d 0.99.5 has indeed made some changes that to how this works. the following code displays the leaderboard correctly

    -(UIViewController*) getRootViewController{
    return (UIViewController*)([(BubbleDreamsAppDelegate*) [[UIApplication sharedApplication] delegate] viewController]);
    

    }

    and then

    highScoreVC = [self getRootViewController];
    
    
        GKLeaderboardViewController *leaderboardController = [[[GKLeaderboardViewController alloc] init] autorelease];
    
        if (leaderboardController != nil)
        {
            leaderboardController.leaderboardDelegate = self;
    
            [highScoreVC presentModalViewController:leaderboardController animated: YES];
    
    
        }
    

    hope this helps anyone that gets stuck with same problem

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

Sidebar

Related Questions

My project is a universal iPhone/iPad app and it was all working fine in
I have written a universal app that's working fine on both iPhone (iPod Touch)
I created a universal app for the iPhone-iPad. I'm only working on the iPhone
I'm trying to get clojure/emacs/swank/cake all working together. According to assembla I need 'cake
I have an iPhone app I am working on to make universal for iPhone
I've just finished my app for iPhone and it is working fine. I now
While working on an universal binary for iPhone / iPad, I've been asking my
I'm working on a universal iPhone/iPad application. I'm using MonoTouch, but I can take
I have been trying to get images rendered in Primefaces-application. This is working fine
They were all working fine on my XAMMP sandbox but now nothing. Something im

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.