Instance Property

isHosted

A Boolean value that indicates whether the match is hosted or peer-to-peer.

Declaration

var isHosted: Bool { get set }

Discussion

The value of the hosted property determines which methods of the delegate are called when the match is complete. If true, this is a hosted match, and the delegate’s matchmakerViewController:didFindPlayers method is to provide the list of players to your game. If false, this is a peer-to-peer match, and matchmakerViewController:didCreateMatch is called with a GKMatch object. The default value is false.

Hosted matches require you to provide a server that hosts the participants in the match. For more information on implementing hosted matches, see Real-Time Matches.

See Also

Matchmaker View Controller Properties

var matchRequest: GKMatchRequest

The configuration for the desired match.