1
Game Center를 사용하는 간단한 iOS 앱이 있습니다. 그러나 최근에 iOS 7로 업데이트 할 때 authenticate 메소드가 작동하지 않는 것으로 나타났습니다.게임 센터 인증보기가 표시되지 않음 - iOS
문제 중 하나는 내가 게임 센터에 로그인해야하는 경우 사용자에게보기 컨트롤러를 제공하기 위해 사용하는 코드와 더 이상 앱의 게임 센터 로그인 창이 팝업되지 않는다는 것입니다.
내가 가지고있는 또 다른 문제는 사용되지 않는 "authenticateWithCompletionHandler"대신 사용할 메서드를 찾을 수 없다는 것입니다. 당신의 시간, 댄에 대한
-(void)authenticateLocalUser {
GKLocalPlayer.localPlayer.authenticateHandler = ^(UIViewController *viewController, NSError *error) {
if (GKLocalPlayer.localPlayer.authenticated) {
// Already authenticated
}
else if (viewController) {
[self presentViewController:viewController animated:YES completion:nil];
}
else {
// Problem with authentication, probably bc the user doesn't use Game Center.
}
};
if ([GKLocalPlayer localPlayer].authenticated == NO) {
[[GKLocalPlayer localPlayer] authenticateWithCompletionHandler:^(NSError *error) {
[self callDelegateOnMainThread: @selector(processGameCenterAuth:) withArg:NULL error: error];
}];
}
}
감사 :
여기 내 코드입니다.