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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:43:16+00:00 2026-05-27T20:43:16+00:00

I have a warning message when I load Game Center Leaderboards with: GKLeaderboardViewController *leaderboardController

  • 0

I have a warning message when I load Game Center Leaderboards with:

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

Warning massage appears in third line, and It says:

warning: Semantic Issue: Assigning to
‘id’ from incompatible type
‘ViewMenuController *’

I understand the message but I don’t know how solve it.
The code works fine, but I would like remove the warning or find if there is a better way to load leaderboards.

Thanks in advance.

Solution:

I have done two modifications in ViewMenuController.h:

Add this import:

#import <GameKit/GameKit.h>

and modify this line adding :

@interface ViewMenuController : UIViewController <GKLeaderboardViewControllerDelegate> {

Thanks everybody for your help!

  • 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-27T20:43:17+00:00Added an answer on May 27, 2026 at 8:43 pm

    Best guess is when you are setting the leaderboardDelegate to self, it is expecting a id<GKLeaderboardViewControllerDelegate>, but your ViewMenuController does not define itself as conforming to the GKLeaderboardViewControllerDelegate protocol.

    Make sure you set this in the interface of ViewMenuController.

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

Sidebar

Related Questions

My co-worker and I have come across this warning message a couple times recently.
I have installed lately XCode 4+, and since on I get warning message 'window'
I have a warning MyAnnotation does not implement the MKAnnotation protocol everytime I use
I have this warning every time I run my CGI-script (output is rendered by
WARNING: I have been learning Python for all of 10 minutes so apologies for
Warning: I have very little JavsScript experience. In my past programming experience, I usually
(Warning - asp newbie) I have an aspx file with the tag <%@ Page
I have a invalid XML like this Warning: count() [function.count]: Node no longer exists
I have a function that gives me the following warning: [DCC Warning] filename.pas(6939): W1035
I have been using a noscript tag to show a warning when users have

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.