How to solve inviting friend over game center?

你说的曾经没有我的故事 提交于 2019-12-12 12:27:39

问题


I am working on a multiplayer game through game center and I am having one problem. When I try to invite one of my friends I get failed status. I have tried with simulator and iphone and with two iphones and always the same problem.

I have searched a solution for my problem and found out that there are many developers with this problem. I am using iOS 6 and app is still in production so it is in sandbox.

I am using same code like is on Ray Wenderlich tutorial - CatRace (there have too people writen about this problem but nobody has post a solution.

Does anybody know how to solve that problem?


回答1:


Please Check this:

1> You set inviteHandler just after the local player has authenticated.
2> The player you're trying to invite did allow game invites in their account settings. In case you had two test accounts, you could forget you disallowed it for both of them. In such case the push notification for invite won't even be sent to the other player.
3> Do not use same game center account for testing.



来源:https://stackoverflow.com/questions/14308036/how-to-solve-inviting-friend-over-game-center

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!