Ida*_*dan 4 cocoa-touch objective-c game-center
我正在尝试调用游戏中心的身份验证方法,但是没有出现身份验证屏幕,并且回调返回错误:"请求的操作已被取消".
代码 :
[[GKLocalPlayer localPlayer] authenticateWithCompletionHandler:^(NSError *error)
{
NSDictionary *userInfo = nil;
if (error == nil) {
NSLog(@"Game Center successfully authenticated");
}
else {
userInfo = [NSDictionary dictionaryWithObject:error forKey:@"NSError"];
}
[[NSNotificationCenter defaultCenter] postNotificationName:Notification
object:self
userInfo:userInfo];
}];
Run Code Online (Sandbox Code Playgroud)
知道什么可能导致这个问题吗?
小智 17
在iOS 4.2中,当用户取消登录到Game Center时,在3次尝试之后返回错误.您可以通过使用Game Center应用程序登录来解决错误,然后再次尝试您的应用程序,您应该会在应用程序中看到来自Game Center的欢迎回复消息
| 归档时间: |
|
| 查看次数: |
8069 次 |
| 最近记录: |