I'm adding online two player to a game using Game Kit. My test devices are a 3rd gen iPod touch running 4.3.5 and a 2nd gen iPod touch running 4.2.1. Game Center notifications are turned on on both devices. I am not using the iPhone Simulator. Both devices are logged into the Game 开发者_开发问答Center Sandbox with separate accounts. The accounts are already friends.
I can successfully authenticate the localPlayer
and initiate an invite but the invited device never receives the invitation and the invited game's inviteHandler
is never called. The inviteHandler
is set immediately after authenticating the localPlayer
. I've scoured the Game Kit Programming Guide and implemented all methods in the GKMatchmakerViewControllerDelegate
protocol but I'm stumped.
Turns out that back when I originally created these Sandbox accounts I turned off "Allow Game Invites". In Game Center.app on the Sandbox/Me tab tap the yellow Account banner and then View Account. Only discovered this when creating a new Sandbox account on a third device just now. Can I get a derp?
精彩评论