Platforms to show: All Mac Windows Linux Cross-Platform

Back to GKMatchmakerMBS class.

GKMatchmakerMBS.addPlayersToMatch(match as GKMatchMBS, matchRequest as GKMatchRequestMBS, tag as Variant = nil)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Adds players to an existing match.

match: A previously created match.
matchRequest: The parameters for the new match request.

This method updates an existing match object by adding additional players.

When this method is called, it creates a new background task to handle the request. The method then returns control to your game. Later, when the task is complete, Game Kit calls GameKitMBS.addPlayersToMatchCompleted event.

GKMatchmakerMBS.cancel

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Cancels a pending matchmaking request.

The completion event receives a callback with a GKErrorCancelled error.

GKMatchmakerMBS.cancelInviteToPlayer(playerID as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GameKit MBS MacFrameworks Plugin 13.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Cancel a pending invitation to a player.

Available on Mac OS X 10.8.2 and newer.

GKMatchmakerMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The constructor.

GKMatchmakerMBS.Destructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
The destructor.

GKMatchmakerMBS.findMatchForRequest(request as GKMatchRequestMBS, tag as Variant = nil)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Initiates a request to find players for a peer-to-peer match.

When this method is called, it creates a new background task to handle the request. The method then returns control to your game. Later, when the task is complete, Game Kit calls GameKitMBS.findMatchForRequestCompleted event.

The match request's playersToInvite property is ignored; to invite a specific set of players to the match, you must display the standard user interface.

GKMatchmakerMBS.findPlayersForHostedMatchRequest(request as GKMatchRequestMBS, tag as Variant = nil)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Initiates a request to find players for a hosted match.

request: The configuration for the desired match.

When this method is called, it creates a new background task to handle the request. The method then returns control to your game. Later, when the task is complete, Game Kit calls GameKitMBS.findPlayersForHostedMatchRequestCompleted event. When the event is called, your game should connect those players to your own server.

The match request's playersToInvite property is ignored; to invite a specific set of players to the match, you must display the standard user interface.

GKMatchmakerMBS.finishMatchmakingForMatch(match as GKMatchMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GameKit MBS MacFrameworks Plugin 13.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Call this when finished with all programmatic P2P invites/matchmaking, for compatability with connected players using GKMatchmakerViewController.

Available on Mac OS X 10.8.2 and newer.

GKMatchmakerMBS.matchForInvite(invite as GKInviteMBS, tag as Variant = nil)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GameKit MBS MacFrameworks Plugin 13.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Get a match for an accepted invite.

Calls later GameKitMBS.matchForInviteCompleted eventg.

Possible reasons for error:
1. Communications failure.
2. Invite cancelled.

Available on Mac OS X 10.8.2 and newer.

GKMatchmakerMBS.queryActivity(tag as Variant = nil)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Initiates a search for activity in all player groups.

A query allows your game to see how many players have recently searched for a match, across all player groups.

When this method is called, it creates a new background task to handle the request. The method then returns control to your game. Later, when the task is complete, Game Kit calls GameKitMBS.queryActivityCompleted.

GKMatchmakerMBS.queryPlayerGroupActivity(playerGroup as Integer, tag as Variant = nil)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Queries Game Center for the activity in a player group.

playerGroup: A number that uniquely identifies a subset of players of your game.

A query allows your game to see how many players have recently searched for a match. As a result, you can present a user interface that shows the relative activity in each player group. For example, if one group sees less activity than others, you might display a warning so that players are aware that finding a match may take longer.

When this method is called, it creates a new background task to handle the request. The method then returns control to your game. Later, when the task is complete, Game Kit calls GameKitMBS.queryPlayerGroupActivityCompleted event.

GKMatchmakerMBS.startBrowsingForNearbyPlayers(tag as Variant = nil)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GameKit MBS MacFrameworks Plugin 13.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Start browsing for nearby players that can be invited to a match.

The GameKitMBS.startBrowsingForNearbyPlayersCompleted event will be called for each player found with a compatible game. It may be called more than once for the same player if that player ever becomes unreachable (e.g. moves out of range). You should call stopBrowsingForNearbyPlayers when finished browsing.

Available on Mac OS X 10.8.2 and newer.

GKMatchmakerMBS.stopBrowsingForNearbyPlayers

Type Topic Plugin Version macOS Windows Linux iOS Targets
method GameKit MBS MacFrameworks Plugin 13.0 ✅ Yes ❌ No ❌ No ❌ No Desktop only
Stop browsing for nearby players.

Available on Mac OS X 10.8.2 and newer.

The items on this page are in the following plugins: MBS MacFrameworks Plugin.


The biggest plugin in space...