Class

GKTurnBasedParticipant

The information that describes a participant in a turn-based match.

Declaration

class GKTurnBasedParticipant : NSObject

Overview

Your game never creates objects of this class directly; instead it retrieves an array of GKTurnBasedParticipant objects from a GKTurnBasedMatch object.

Most information stored in a GKTurnBasedParticipant object is read-only, and is provided by GameKit to assist you in implementing your game logic. However, the matchOutcome property is quite important; before your game ends a match, it must set the matchOutcome property for every participant in the match.

Subclassing

This class may not be subclassed.

Topics

Participant Information

var lastTurnDate: Date?

The date and time that this participant last took a turn in the game.

var player: GKPlayer?

The GKPlayer object that identifies this participant.

var status: GKTurnBasedParticipant.Status

The current status of the participant.

var timeoutDate: Date?

The date and time that the participant’s turn timed out.

enum GKTurnBasedParticipant.Status

The state the participant is in during the match.

var playerID: String?

The player identifier for this participant.

Deprecated

Setting the Match Outcome

var matchOutcome: GKTurnBasedMatch.Outcome

The end-state of this participant in the match.

enum GKTurnBasedMatch.Outcome

The state the participant was in when they left the match.

Relationships

Inherits From

Conforms To

See Also

Turn-based Games

class GKTurnBasedMatch

An object used to implement turn-based matches between sets of players on Game Center.

class GKTurnBasedExchange

The exchange information sent between players even when a player is not the current player.

class GKTurnBasedExchangeReply

The player’s response to an exchange.

protocol GKTurnBasedEventListener

The protocol you implement to handle exchanges and match-related events for turn-based games.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software