当我调用authenticateWithCompletionHandler方法来授权AGC时,我单击Cancel按钮并关闭UI。如果以后再次调用authenticateWithCompletionHandler,这次Game Kit不会调用我游戏提供的块对象。
谁能告诉我为什么?
我的代码如下:
- (void) authenticateLocalUser {
NSLog(@"====inside authenticateLocalUser");
[[GKLocalPlayer localPlayer] authenticateWithCompletionHandler:^(NSError *error) {
NSLog(@"==== error is %@", error);
[self callDelegateOnMainThread: @selector(finishAuthenticateLocalUser:) withArg: NULL error: error];
}]; }
日志如下:
2012-06-20 19:24:06.569 HighNoon[4140:707] ====inside authenticateLocalUser
2012-06-20 19:24:06.571 HighNoon[4140:707] authenticateWithCompletionHandler: enter
2012-06-20 19:24:06.572 HighNoon[4140:707] authenticateWithCompletionHandler: exit