游戏中心邀请处理程序,它属于哪里?

发布于 2024-11-14 20:04:40 字数 660 浏览 5 评论 0原文

我已经搜索了该网站并发现了这个:

GameCenter Invitation Handler

他说:

如文档中所述

您的应用程序应设置 邀请处理者最早 您的申请完成后可能会 推出;一个合适的地方来设置 处理程序位于完成块中 你提供了在之后执行的 本地玩家已通过身份验证。

.. 好吧,这很酷,但是!

我想仅在收到邀请时对玩家进行身份验证 .. 示例:

场景:

玩家启动游戏,玩单人游戏模式,退出游戏。[无游戏中心身份验证]。

玩家接受邀请,游戏启动,邀请处理程序收到邀请通知,对玩家进行身份验证,游戏开始,

玩家选择在线游戏,游戏中心对玩家进行身份验证......

所以

,我的观点是,我不想 。到不必要地对玩家进行身份验证..如果可能的话,这会导致问题,我应该将邀请处理程序代码放在哪里?显然不是在身份验证之后,因为正如我已经说过的,我不想对玩家进行不必要的身份验证...

谢谢=)

I already searched the site and found this:

GameCenter Invitation Handler

He says:

"

As stated in the docs

Your application should set the
invitation handler as early as
possible after your application is
launched; an appropriate place to set
the handler is in the completion block
you provided that executes after the
local player is authenticated.

"

.. OK, that's cool, but!

I would like Authenticate the player ONLY if an invitation was received .. Example:

Scenarios:

The player launches the game, plays single player mode, exits the game. [No Game center authentication].

The player accepts an invite, the game launches, invitation handler receives an invitation notification, authenticates the player, game starts.

The player chooses an online game, Game center authenticates the player.

..

So, My point is, I don't want to authenticate the player unnecessarily .. if possible. Which leads to the question, where should I place the invitation handler code? Obviously not after the authentication, since, as I already said, I don't want to authenticate the player unnecessarily ...

Thanks =)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

甜尕妞 2024-11-21 20:04:40

经过几天的思考和搜索,似乎您必须对本地玩家进行身份验证并在成功身份验证后启动邀请处理程序..这是在游戏中支持邀请的唯一方法..

After days of thinking and searching, seems like you HAVE to authenticate the local player and initiate the invitation handler upon successful authentication .. This is the only way to support invitations in your game ..

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文