2014-02-28 2 views
2

GameCenter를 내 앱에 구현하려고합니다. 이것은 GameCenter LeaderBoard를 보여 주지만 그것은 No 항목을 보여줍니다.스코어 보드 "No Items"

-(IBAction) ShowLeader{ 

GKGameCenterViewController* gameCenterController = [[GKGameCenterViewController alloc] init]; 
gameCenterController.viewState = GKGameCenterViewControllerStateLeaderboards; 
gameCenterController.gameCenterDelegate = self; 
[self presentViewController:gameCenterController animated:YES completion:nil]; 

은}

사용자를 인증하고 그 내가 연결할 때 표시합니다.

내가 내 GameViewController에 점수를보고 할 때 : 내가 그것을 작동하는 가정 있도록이 나에게 오류를 보여줍니다

if ([GKLocalPlayer localPlayer].isAuthenticated) { 
    GKScore* scoreReporter = [[GKScore alloc] initWithLeaderboardIdentifier:@"GameHighScore"]; 

    scoreReporter.value = HighScoreNbr; 
    scoreReporter.context = 0; 

    // NSArray *scores = @[scoreReporter]; 
    [GKScore reportScores:@[scoreReporter] withCompletionHandler:^(NSError *error) { 


     if (error) { 
      NSLog(@"error: %@", error); 
     } 
    printf("no error: "); 
    }]; 
} 

.

다른 답변에서 보았지만 도움이되지 않았으므로 이미 2 개의 계정으로 시도했습니다.

추가 정보가 필요하면 의견을 말하십시오.

감사합니다.

답변

1

나는 비디오의 톤을 읽고보고 나 자신을 발견했다.

당신은 아이튠즈에서 BundleID이 xcode5 정보를 재생 목록에 연결했다해야 그 같은 문제로 사람을 도울 수 있다면

. 그러면 작동합니다. gamekit이 PLIST에 Required device capabilities에서 누락되는 경우도 발생할 수)

1

,

는 도움이되기를 바랍니다.

+0

감사합니다. 도움이되었습니다. :) –