이 방법은 iOS 6에서 사용되지 않지만 여전히 작동합니다. 이 메소드는, 추천되지 않는 메소드 경고만을 발행합니다. 내 AppDelegate.m
파일에서 : Game Center 로그인보기 컨트롤러는 deprecated authenticateWithCompletionHandler : 메서드를 사용할 때만 나타납니다.
[[GKLocalPlayer localPlayer] authenticateWithCompletionHandler:(^(NSError *error) {
if (localPlayer.isAuthenticated) {
self.gameCenterAuthenticationComplete = YES;
if (! self.currentPlayerID || ! [self.currentPlayerID isEqualToString:localPlayer.playerID]) {
self.currentPlayerID = localPlayer.playerID;
}
} else {
self.gameCenterAuthenticationComplete = NO;
}
})];
그래서 내가 경고를 표시 할 수 아이폰 OS 6에 그것을 할 수있는 적절한 방법 대신이 방법을 사용하기 위해 노력하고있어,하지만 난
Game Center login view controller
을 얻을 수 없습니다 올 :
[[GKLocalPlayer localPlayer] setAuthenticateHandler:(^(UIViewController *viewController, NSError *error) {
if (localPlayer.isAuthenticated) {
self.gameCenterAuthenticationComplete = YES;
if (! self.currentPlayerID || ! [self.currentPlayerID isEqualToString:localPlayer.playerID]) {
self.currentPlayerID = localPlayer.playerID;
}
} else {
UIAlertView *alertView = [[UIAlertView alloc]
initWithTitle:@"NOT AUTHORIZED"
message:@"This game requires Game Center to create matches."
delegate:self
cancelButtonTitle:@"OK"
otherButtonTitles:nil];
[alertView show];
self.gameCenterAuthenticationComplete = NO;
}
})];
}
return YES;
첫 번째 방법 - 사용되지 않는 방법 - 응용 프로그램이 열리고 사용자가 GC에 로그인되지 않은 것을 감지하면 즉시 Game Center login view
을 제공합니다. . 아이폰 OS 6 방법 - - 또한
사용자가 로그인 할 때 이 팝 오버 꼬추를 "환영"두 번째 방법 표시 내가 위에서 언급 한 바와 같이, GC login screen
를 표시하지 않습니다,하지만 을 말하는가 사용자가 이미 GC 앱을 통해 GC에 로그인 한 경우 "Welcome Back"
자세한 내용은 내 iPhone 5 (6.0.1), 내 iPad mini (6.0.2) 및 시뮬레이터 (6.0)에서 을 사용해 보았습니다.
누구에게 이런 일이 발생했는지 알 수 있습니까? 그게 내가해야 할 일이 있다면 수동으로 GC login view controller
을 두 번째 방법으로 어떻게 표시합니까?