GameCenter登录提醒 [英] GameCenter login alert

查看:146
本文介绍了GameCenter登录提醒的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我使用GameCenter开发的游戏中,我想处理以下场景:

In a game I am developing using GameCenter, I want to handle the following scenario:


  1. 用户启动游戏。系统会显示系统警报,提示他登录GameCenter。他暂时忽略了它。

  2. 片刻之后,用户想要登录GameCenter并点击(例如)Leaderboards菜单项。他现在选择取消而不是登录。

  3. 该过程重复几次。最终用户想要登录GameCenter。他再次单击Leaderboard菜单项。

在我的测试中,我发现通过调用提出的警报弹出窗口 authenticateWithCompletionHandler(由Apple的示例GameCenterManager调用)建议登录到GameCenter只出现有限次数(4或5)。最后一次显示,它显示游戏中心禁用,登录游戏中心应用程序启用后续。之后,调用authenticateWithCompletionHandler不再做任何可见的事情 - 根本没有提示。

In my tests, I have found that the alert popup raised by the call to "authenticateWithCompletionHandler" (as invoked by Apple's sample GameCenterManager) which suggests to log in to GameCenter only appears a limited number of times(4 or 5). The last time it appears, it says "Game Center Disabled, sign in with the Game Center application to enable"Afterwards". Afterwards, calling authenticateWithCompletionHandler no longer does anything visible -no prompt at all.

播放FruitNinja我试图复制这个。但是,在他们的情况下,每次点击GameCenter项目(例如,成就)时,会出现禁止游戏中心的弹出窗口。

Playing FruitNinja I tried to replicate this. However, in their case, the popup saying "Game Center Disabled" does appear every time I click on a GameCenter item(Achievements, for instance).

我想要做的是复制功能:也就是说,如果您没有登录到GameCenter,那么只要您点击标准游戏中心警报就会出现排行榜菜单项。

What I'd like to do is to duplicate the functionality: that is, if you are not logged in to GameCenter, to have the standard game center alert appear all the times you click on the Leaderboard menu item.

有没有办法了解标准的登录游戏中心警报是否已出现,或强制它始终出现(和不只是前几次尝试)?

Is there a way to learn whether the standard 'log in to game center' alert has appeared, or to force it to appear at all times(and not just the first couple of tries)?

推荐答案

在N次尝试失败后,行为会产生影响 - 禁用GameCenter F或应用程序。重新启动应用程序或登录gamecenter本身将使其恢复在线状态。

The behavior is something to the effect of, after N unsuccessful attempts - disable GameCenter for the app. Restarting the app or going to login in gamecenter itself will get it back online.

我忘记了我在哪个文档中阅读过,但是有一个Apple doc在那里解释了这种行为。

I forget which doc I read this in, but there is an Apple doc out there that explains this behavior.

这篇关于GameCenter登录提醒的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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