2012-11-04 6 views
0

나는 오랫동안 점수를 관리하기 위해 사과 예제 GKTapper (2010 년부터)를 사용 해왔다. iOS6에서 작동이 멈췄습니다. 다음 스 니펫을 추가했는데 리더 보드에 여전히 '로드 할 수 없음'이라고 표시되어 있기 때문에 무엇을해야할지 확신 할 수 없습니다. (로그인 할 수 있었지만 점수가로드되지 않았습니다.) 도와주세요!게임 센터에서 iOS6에서 점수를로드 할 수 없습니다.

#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] \ 
compare:v options:NSNumericSearch] == NSOrderedAscending) 

- (void) authenticateLocalUser 
{ 

if([GKLocalPlayer localPlayer].authenticated == NO) 
{ 

if (SYSTEM_VERSION_LESS_THAN(@"6.0")) 
{ 

    [[GKLocalPlayer localPlayer] authenticateWithCompletionHandler:^(NSError *error) 
     { 
      [self callDelegateOnMainThread: @selector(processGameCenterAuth:) withArg: NULL error: error]; 
     }]; 
}else{ 

    [[GKLocalPlayer localPlayer] setAuthenticateHandler:(^(UIViewController* viewcontroller, NSError *error) { 
     if (!error && viewcontroller) 
     { 
      [self callDelegateOnMainThread: @selector(processGameCenterAuth:) withArg: NULL error: error]; 
     } 
     else 
     { 
      //do nothing 
     } 
    })]; 
} 
} 



} 

답변

0

iOS6의 경우 UIViewController를 직접 제출해야합니다. 그게 processGameCenterAuth에서 완료되고 있습니까? 블록 내에서

[self presentViewController: viewcontroller]; 

:

IOW 당신은 ​​같은 코드 뭔가가 필요합니다.

관련 문제