Deprecated GKTurnBasedEventHandlerDelegate Methods

A method identified as deprecated has been superseded and may become unsupported in the future.

Deprecated in iOS 6.0

handleMatchEnded:

Sent to the delegate when a match the local player is participating in has ended. (Deprecated in iOS 6.0.)

- (void)handleMatchEnded:(GKTurnBasedMatch *)match
Parameters
match

The match that just ended.

Discussion

When your delegate receives this message, it should display the match’s final results to the player and allow the player the option of saving or removing the match data from Game Center.

Availability
  • Available in iOS 5.0 and later.
  • Deprecated in iOS 6.0.
Declared In
GKTurnBasedMatch.h

handleTurnEventForMatch:

Sent to the delegate when it is the local player’s turn to act in a turn-based match. (Deprecated in iOS 6.0. Implement handleTurnEventForMatch:didBecomeActive: instead.)

- (void)handleTurnEventForMatch:(GKTurnBasedMatch *)match
Parameters
match

A match object containing the current state of the match.

Discussion

When your delegate receives this message, the player has accepted a push notification for a match already in progress. Your game should end whatever task it was performing and switch to the match information provided by the match object.

Availability
  • Available in iOS 5.0 and later.
  • Deprecated in iOS 6.0.
Declared In
GKTurnBasedMatch.h

Deprecated in iOS 7.0

handleInviteFromGameCenter:

Sent to the delegate when the local player receives an invitation to join a new turn-based match. (Deprecated in iOS 7.0.)

- (void)handleInviteFromGameCenter:(NSArray *)playersToInvite
Parameters
playersToInvite

An array of NSString objects containing the player identifiers for the players to initially invite to the game.

Discussion

When your delegate receives this message, your game should create a new GKMatchRequest object and assign the playersToInvite parameter to the match request’s playersToInvite property. Then, your game can either call the GKTurnBasedMatch class method findMatchForRequest:withCompletionHandler: to find a match programmatically or it can use the request to instantiate a new GKTurnBasedMatchmakerViewController object to show a user interface to the player.

Availability
  • Available in iOS 5.0 and later.
  • Deprecated in iOS 7.0.
Declared In
GKTurnBasedMatch.h

handleTurnEventForMatch:didBecomeActive:

Sent to the delegate when it is the local player’s turn to act in a turn-based match. (Deprecated in iOS 7.0.)

- (void)handleTurnEventForMatch:(GKTurnBasedMatch *)match didBecomeActive:(BOOL)didBecomeActive
Parameters
match

A match object containing the current state of the match.

didBecomeActive

YES if the game was launched or brought to the foreground to handle the event.

Discussion

When your delegate receives this message, the player has accepted a push notification for a match already in progress. Your game should end whatever task it was performing and switch to the match information provided by the match object.

Availability
  • Available in iOS 6.0 and later.
  • Deprecated in iOS 7.0.
Declared In
GKTurnBasedMatch.h