问题
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