iOS开发:验证Game Center用户的奇怪问题 [英] iOS Development: Strange problem with authenticating Game Center user
问题描述
我正在构建一款支持Game Center(GC)的iPhone游戏。当应用程序启动时,我尝试验证本地播放器...
I'm building an iPhone game that supports Game Center (GC). When the app launches, I try to authenticate the local player...
if([GKLocalPlayer localPlayer].authenticated == NO)
{
[[GKLocalPlayer localPlayer] authenticateWithCompletionHandler:^(NSError *error)
{
[self callDelegateOnMainThread: @selector(processGameCenterAuth:) withArg: NULL error: error];
}];
}
一切似乎都运转良好。如果用户在应用程序启动时未登录GC,应用程序将显示一个对话框,为其提供三个选项...
Everything seemed to be working well. If the user wasn't signed into GC when the app launched, the app would display a dialog box giving them three options...
- 登录现有帐户
- 创建帐户
- 取消
这是所需的行为,但在我测试时,我点击了取消选项,现在每次都出现身份验证过程错误,出现以下错误请求的操作已被取消。即使我删除应用程序并重新安装它,它仍然会出错并且该对话框现在永远不会弹出。
This is the desired behavior, but while I was testing, I clicked the "Cancel" option and now the authentication process errors out every time with the following error "The requested operation has been cancelled." Even when I delete the app and reinstall it, it still errors out and that dialog box never pops ups now.
有谁知道为什么会发生这种情况或我如何解决它?
Does anyone know why this is happening or how I can fix it?
提前感谢您的智慧!
推荐答案
事实证明这是苹果未记录的行为。
It turns out that is apple undocumented behavior.
用户按3次连续按下取消后,他必须转到游戏中心应用程序并从那里连接。
After 3 times a user press cancel in a row, he has to go to the Game Center app and connect from there.
Go Figure。
Go Figure.
这篇关于iOS开发:验证Game Center用户的奇怪问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!