One Logo Pool Ball
GameKit · IOS API REFERENCE

GKMatch

class · iOS 4.1+ · SDK 27.1

class GKMatch

Members (16)

method · iOS 6.0+ · Deprecated in iOS 8.0

chooseBestHostPlayer

TypeScript
chooseBestHostPlayer(completionHandler: ((arg0: (string) | null) => void)): void
Swift declaration
func chooseBestHostPlayer(completionHandler: @escaping @Sendable (String?) -> Void)
method · iOS 8.0+

chooseBestHostingPlayer

TypeScript
chooseBestHostingPlayer(completionHandler: ((arg0: (GKPlayer) | null) => void)): void
Swift declaration
func chooseBestHostingPlayer() async -> GKPlayer?
method · iOS 4.1+

disconnect

TypeScript
disconnect(): void
Swift declaration
func disconnect()
init

init

TypeScript
static init(): GKMatch
Swift declaration
init()
method · iOS 6.0+

rematch

TypeScript
rematch(completionHandler?: (((arg0: (GKMatch) | null, arg1: (NativeError) | null) => void)) | null): void
Swift declaration
func rematch() async throws -> GKMatch
method · iOS 8.0+

send

TypeScript
sendToDataMode(data: ArrayBuffer, players: Array<GKPlayer>, mode: GKMatch_SendDataMode): void
Swift declaration
func send(_ data: Data, to players: [GKPlayer], dataMode mode: GKMatch.SendDataMode) throws
method · iOS 4.1+ · Deprecated in iOS 8.0

send

TypeScript
sendToPlayersWith(data: ArrayBuffer, playerIDs: Array<string>, mode: GKMatch_SendDataMode): void
Swift declaration
func send(_ data: Data, toPlayers playerIDs: [String], with mode: GKMatch.SendDataMode) throws
method · iOS 4.1+

sendData

TypeScript
sendData(data: ArrayBuffer, mode: GKMatch_SendDataMode): void
Swift declaration
func sendData(toAllPlayers data: Data, with mode: GKMatch.SendDataMode) throws
method · iOS 4.1+ · Deprecated in iOS 18.0

voiceChat

TypeScript
voiceChat(name: string): (GKVoiceChat) | null
Swift declaration
func voiceChat(withName name: String) -> GKVoiceChat?
get · iOS 4.1+

delegate

TypeScript
get delegate(): (SDKHandle) | null
Swift declaration
weak var delegate: (any GKMatchDelegate)? { get set }
set · iOS 4.1+

delegate

TypeScript
set delegate(value: (Implements<GKMatchDelegate> | SDKHandle) | null)
Swift declaration
weak var delegate: (any GKMatchDelegate)? { get set }
get · iOS 4.1+

expectedPlayerCount

TypeScript
get expectedPlayerCount(): number
Swift declaration
var expectedPlayerCount: Int { get }
get · iOS 4.1+ · Deprecated in iOS 8.0

playerIDs

TypeScript
get playerIDs(): (Array<string>) | null
Swift declaration
var playerIDs: [String]? { get }
get · iOS 17.2+

playerProperties

TypeScript
get playerProperties(): (NativeMap<GKPlayer, Record<string, unknown>>) | null
Swift declaration
var playerProperties: [GKPlayer : [String : Any]]? { get }
get · iOS 8.0+

players

TypeScript
get players(): Array<GKPlayer>
Swift declaration
var players: [GKPlayer] { get }
get · iOS 17.2+

properties

TypeScript
get properties(): (Record<string, unknown>) | null
Swift declaration
var properties: [String : Any]? { get }

Skipped declarations

No declarations were skipped in this snapshot.

All GameKit types →