游戏中心邀请处理程序,它在哪里属于? [英] Game Center Invitation handler, Where does it belong?

查看:136
本文介绍了游戏中心邀请处理程序,它在哪里属于?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经搜查了现场,发现这样的:

I already searched the site and found this:

GameCenter的邀请处理器

他说:

由于在文档中阐明

您的应用程序应该设置
  邀请处理器早
  可能后您的应用程序
  启动;一个合适的位置设置
  处理程序是完成块
  您所提供的后执行
  本土选手进行身份验证。

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:

方案:

玩家启动游戏,玩单人游戏模式,退出了比赛。 [无游戏中心的认证。

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.

..

所以,我想说的是,我不希望如果可能的不必要的验证机..。这导致的问题,我应该在哪里放置邀请处理器code?显然不是的认证之后,因为,正如我已经说过,我不想不必要的验证机...

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 ...

感谢=)

推荐答案

在思考与探索的日子,好像你必须认证的本土球员,并开始在验证成功邀请处理程序。这是支持的唯一途径在你的游戏邀请。

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 ..

这篇关于游戏中心邀请处理程序,它在哪里属于?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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