Game Center身份验证错误 [英] Game Center authentication error

查看:609
本文介绍了Game Center身份验证错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试调用游戏中心的身份验证方法,但是没有验证屏幕,并且回调返回一个错误:请求的操作已取消。

I'm trying to call the authentication method of game center, however no authentication screen comes up and the callback return with an error : "the requested operation has been canceled".

代码:

[[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];

    }];

任何想法可能导致此问题?

Any idea what can cause this issue ?

推荐答案

在iOS 4.2中,当用户取消登录游戏中心,3次尝试后返回错误。您可以通过使用Game Center应用程序登录,然后再次尝试您的应用程序来解决错误,您应该会在应用程序中看到来自Game Center的欢迎回复消息

In iOS 4.2 when a user cancels the login to Game Center, after 3 attempts that error is returned. You can resolve the error by logging in using the Game Center app, then try your app again, you should see the welcome back message from Game Center in your app

这篇关于Game Center身份验证错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆