在 DidFinishLaunchingWithOptions 我正在尝试使用此代码对玩家进行身份验证
// Authenticate Player with Game Center
GKLocalPlayer *localPlayer = [GKLocalPlayer localPlayer];
// Handle the call back from Game Center Authentication
[localPlayer localPlayer.authenticateHandler:^(NSError *error)
{
if (localPlayer.isAuthenticated)
{
// Player was successfully authenticated.
// Perform additional tasks for the authenticated player.
}
else if (error != nil)
{
NSLog(@"error : %@", [error description]);
}
}];
return YES;
}
但是我在这条线上得到错误[localPlayer localPlayer.authenticateHandler:^(NSError *error)
说缺少方括号']'并且指向句号'。我无法让这个工作谢谢