
- (voID) authenticateLocalPlayer{ [[GKLocalPlayer localPlayer] authenticateWithCompletionHandler:^(NSError *error) { if (error == nil) { // Insert code here to handle a successful authentication. NSLog(@"Logged in."); } else { // Your application can process the error parameter to report the error to the player. NSLog(@"%@",[error description]); } }];} 似乎没有为我做的伎俩.我总是收到警告“无法连接到Game Center服务器”.选择“重试”或“取消”.两个NSLog语句都没有被执行,所以我猜到甚至没有触发completionHandler.
如果我按重试,我会收到以下错误:
Error Domain=GKErrorDomain Code=7 "The requested operation Could not be completed because local player is already authenticating." UserInfo=0x8915f80 {NSLocalizedDescription=The requested operation Could not be completed because local player is already authenticating.} 任何人都知道出了什么问题?
解决方法 我发现连接到Game Center时遇到的一个问题是您的日期可能在设备上出错.检查您的日期是否是实际当前日期.不知何故,Game Center不允许来自日期不正确的设备的连接. 总结以上是内存溢出为你收集整理的ios – 使用Game Center验证GKLocalPlayer全部内容,希望文章能够帮你解决ios – 使用Game Center验证GKLocalPlayer所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)