これは私を夢中にさせています。Game Center でローカル プレイヤーを認証しようとするたびに、スレッド 1 の sigkill が発生します。localPlayer
を次のauthenticateHandler
ように設定した後、非同期に発生します。
- (void)authenticateLocalPlayer
{
if([[[UIDevice currentDevice] systemVersion] floatValue] >= 6.0)
{
GKLocalPlayer __weak *localPlayer = [GKLocalPlayer localPlayer];
localPlayer.authenticateHandler = ^(UIViewController *viewController, NSError *error)
{
if (viewController != nil)
{
[[[[[UIApplication sharedApplication] delegate] window] rootViewController] presentViewController:viewController animated:YES completion:nil];
}
else if (localPlayer.isAuthenticated)
{
NSLog(@"Player authenticated");
}
else
{
NSLog(@"Player authentication failed");
}
};
}
}
何か案は?