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
}
})];
}
}
}