iphone - Game Center score posting/leaderboard creation isn't working -


i'm trying games center work with, no luck. i'm using apple sample code. when go view leaderboard in app, see "unable load" under leaderboard in game center.

things i've checked:

  • my bundle id on itunesconnect same in info.plist
  • that leaderboard set on itunesconnect
  • that leaderboard id correctly entered code
  • #import included in .m file

the code have in .h file:

    int *scoreint;   }  -(ibaction)subscore; -(ibaction)showleader; 

code in .m file:

-(ibaction)subscore {     {         gkscore *scorereporter = [[[gkscore alloc] initwithcategory:@"1234567"] autorelease];         //in tuturial value = scoreint, not label.          //try either i_startpt or finalstarpt         scorereporter.value = scoreint;          [scorereporter reportscorewithcompletionhandler:^(nserror *error) {             if (error != nil)             {                 nslog(@"failed!!!");                 nslog(scoreint);             }         }];     } } -(ibaction)showleader {     gkleaderboardviewcontroller *leaderboardcontroller = [[gkleaderboardviewcontroller alloc] init];     if (leaderboardcontroller != nil)     {         leaderboardcontroller.leaderboarddelegate = self;         [self presentmodalviewcontroller: leaderboardcontroller animated: yes];     } }  - (void)leaderboardviewcontrollerdidfinish:(gkleaderboardviewcontroller *)viewcontroller {     [self dismissmodalviewcontrolleranimated:yes]; } 

any suggestions fantastic! i've looked @ similar errors on stackoverflow haven't found solution has worked.

chris

have signed in local player?

also check make sure you've set according apple's leaderboard checklist.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -