Search code examples
game-centerios7gamekit

GameKit GKMatchMaker inviteHandler deprecated in iOS7, what is the replacement?


[GKMatchmaker sharedMatchmaker].inviteHandler is deprecated in iOS 7, yet the GameKit guides still say to set it up that way. Does anyone know what we're supposed to be using for iOS 7 real time game invites? There are new classes / methods for several listener classes, but none address this specifically that I have seen.

'inviteHandler' is deprecated: first deprecated in iOS 7.0

Solution

  • It looks like the intended replacement is the GKInviteEventListener protocol. You can see a reference to it in GKLocalPlayer.h; the GKLocalPlayerListener protocol extends it.

    However, there's limited documentation on this protocol (you can search for it in the documentation window of Xcode 5, but I don't see it on the web).

    Given the lack of documentation, it's probably safest to continue using the deprecated method for now. You'll need to continue using it anyway for iOS6.