add
TypeScriptstatic add(listener: Implements<GKGameSessionEventListener> | SDKHandle): voidSwift declarationclass func add(listener: any GKGameSessionEventListener)class · iOS 10.0+ · Deprecated in iOS 12.0 · SDK 27.1
class GKGameSessionstatic add(listener: Implements<GKGameSessionEventListener> | SDKHandle): voidSwift declarationclass func add(listener: any GKGameSessionEventListener)static createSession(containerName: (string) | null, title: string, maxPlayers: number, completionHandler: ((arg0: (GKGameSession) | null, arg1: (NativeError) | null) => void)): voidSwift declarationclass func createSession(inContainer containerName: String?, withTitle title: String, maxConnectedPlayers maxPlayers: Int) async throws -> GKGameSessionstatic load(identifier: string, completionHandler: ((arg0: (GKGameSession) | null, arg1: (NativeError) | null) => void)): voidSwift declarationclass func load(withIdentifier identifier: String) async throws -> GKGameSessionstatic loadSessions(containerName: (string) | null, completionHandler: ((arg0: (Array<GKGameSession>) | null, arg1: (NativeError) | null) => void)): voidSwift declarationclass func loadSessions(inContainer containerName: String?) async throws -> [GKGameSession]static removeListener(listener: Implements<GKGameSessionEventListener> | SDKHandle): voidSwift declarationclass func remove(listener: any GKGameSessionEventListener)static removeWithIdentifierCompletionHandler(identifier: string, completionHandler: ((arg0: (NativeError) | null) => void)): voidSwift declarationclass func remove(withIdentifier identifier: String) async throwsclearBadge(players: Array<GKCloudPlayer>, completionHandler: ((arg0: (NativeError) | null) => void)): voidSwift declarationfunc clearBadge(for players: [GKCloudPlayer]) async throwsgetShareURL(completionHandler: ((arg0: (string) | null, arg1: (NativeError) | null) => void)): voidSwift declarationfunc shareURL() async throws -> URLstatic init(): GKGameSessionSwift declarationinit()loadData(completionHandler: ((arg0: (ArrayBuffer) | null, arg1: (NativeError) | null) => void)): voidSwift declarationfunc loadData() async throws -> DataplayersWith(state: GKConnectionState): Array<GKCloudPlayer>Swift declarationfunc players(with state: GKConnectionState) -> [GKCloudPlayer]save(data: ArrayBuffer, completionHandler: ((arg0: (ArrayBuffer) | null, arg1: (NativeError) | null) => void)): voidSwift declarationfunc save(_ data: Data, completionHandler: @escaping (Data?, (any Error)?) -> Void)send(data: ArrayBuffer, transport: GKTransportType, completionHandler: ((arg0: (NativeError) | null) => void)): voidSwift declarationfunc send(_ data: Data, with transport: GKTransportType) async throwssendMessage(key: string, arguments_: Array<string>, data: (ArrayBuffer) | null, players: Array<GKCloudPlayer>, badgePlayers: boolean, completionHandler: ((arg0: (NativeError) | null) => void)): voidSwift declarationfunc sendMessage(withLocalizedFormatKey key: String, arguments: [String], data: Data?, to players: [GKCloudPlayer], badgePlayers: Bool) async throwssetConnectionState(state: GKConnectionState, completionHandler: ((arg0: (NativeError) | null) => void)): voidSwift declarationfunc setConnectionState(_ state: GKConnectionState) async throwsget badgedPlayers(): Array<GKCloudPlayer>Swift declarationvar badgedPlayers: [GKCloudPlayer] { get }get identifier(): stringSwift declarationvar identifier: String { get }get lastModifiedDate(): globalThis.DateSwift declarationvar lastModifiedDate: Date { get }get lastModifiedPlayer(): GKCloudPlayerSwift declarationvar lastModifiedPlayer: GKCloudPlayer { get }get maxNumberOfConnectedPlayers(): numberSwift declarationvar maxNumberOfConnectedPlayers: Int { get }get owner(): GKCloudPlayerSwift declarationvar owner: GKCloudPlayer { get }get players(): Array<GKCloudPlayer>Swift declarationvar players: [GKCloudPlayer] { get }get title(): stringSwift declarationvar title: String { get }No declarations were skipped in this snapshot.