Platforms to show: All Mac Windows Linux Cross-Platform

Back to GameKitMBS class.

Previous items

GameKitMBS.matchmakerViewControllerDidFindPlayers(viewController as Variant, playerIDs() as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No
Called when a hosted match is found.

viewController: The view controller that performed the matchmaking. (GKMatchmakerViewControllerMBS)
players: An array of identifier strings for the matched players.

This method is called when the view controller's hosted property is true. Although optional in the protocol, if your game attaches a delegate to the view controller for a hosted match, the view controller expects your game to provide an implementation of this method.

The view controller returns the list of players to your game by calling this method. Your game is responsible for connecting these players to your own server and then using that server to relay messages between the players.

GameKitMBS.matchmakerViewControllerDidReceiveAcceptFromHostedPlayer(viewController as Variant, playerID as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No
Called when a player in a hosted match accepts the invitation.

viewController: The view controller that accepted the invitation. (GKMatchmakerViewControllerMBS)
playerID: The identifier of the accepting player.

After a player accepts an invitation, that player's device should connect to your server. Once the connection is established, your game should call the view controller's setHostedPlayer method to update the player's connection status.

GameKitMBS.matchmakerViewControllerWasCancelled(viewController as Variant)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No
Called when the user cancels the matchmaking request (required)

viewController: The view controller that received the cancellation. (GKMatchmakerViewControllerMBS)

GameKitMBS.matchShouldReinvitePlayer(match as GKMatchMBS, playerID as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No
Called when a player in a two-player match was disconnected.

match: The match that lost the player.
playerID: The identifier for the player whose connection failed.

Your game should return true if it wants Game Kit to attempt to reconnect the player, false if it wants to terminate the match.

Occasionally, players may get disconnected from a match. If your game implements this method in the match delegate and the match only contains two players, Game Kit calls this method after a player gets disconnected. If your delegate allows Game Kit to reconnect to the other player, it reconnects the other player. Your matchDidChangeState event is called when the other player is reconnected.

GameKitMBS.NotificationBannerCompleted(title as string, message as string, duration as Double, tag as Variant)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No
Called by GameKitMBS.showBannerWithTitle after the banner is reported.

Duration is only passed if it was sent with the newer method on Mac OS X 10.8.2 and newer.

GameKitMBS.participantQuitInTurnWithOutcomeCompleted(match as GKTurnBasedMatchMBS, matchOutcome as Integer, nextParticipant as GKTurnBasedParticipantMBS, nextParticipants() as GKTurnBasedParticipantMBS, timeout as Double, matchData as Dictionary, error as NSErrorMBS, tag as Variant)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 13.0 ✅ Yes ❌ No ❌ No ❌ No
The event to be called after the data is uploaded to the server.

Called by GKTurnBasedMatchMBS.participantQuitInTurnWithOutcome.

error: If an error occurred, this error object describes the error. If the operation was completed successfully, the value is nil.

Available on Mac OS X 10.8.2 and newer.

GameKitMBS.participantQuitOutOfTurnWithOutcomeCompleted(match as GKTurnBasedMatchMBS, matchOutcome as Integer, error as NSErrorMBS, tag as Variant)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No
Called by GKTurnBasedMatchMBS.participantQuitOutOfTurnWithOutcome called after the data is uploaded to the server.

If an error occurred, this error object describes the error. If the operation was completed successfully, the value is nil.

GameKitMBS.PlayerAuthenticationDidChange(player as GKPlayerMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No
Player's authentication changed.

Some examples using this event:

GameKitMBS.playerChanged(player as GKPlayerMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No
The player changed.

GameKitMBS.playerStateUpdate(playerID as string, state as Integer, tag as Variant)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No
Called when the state of any participant in the chat changes (including the local player).

player: The player identifier for the player whose status changed.
state: The new state of the player.
You need to call enablePlayerStateUpdate to receive events.

GameKitMBS.queryActivityCompleted(MatchMaker as GKMatchmakerMBS, activity as Integer, error as NSErrorMBS, tag as Variant)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No
Called by GKMatchmakerMBS.queryActivity when query is done.

activity: The amount of activity in the player group.
error: If the search completed successfully, this parameter is nil; otherwise, this parameter holds an error object that describes the error that occurred.

GameKitMBS.queryPlayerGroupActivityCompleted(MatchMaker as GKMatchmakerMBS, playerGroup as Integer, activity as Integer, error as NSErrorMBS, tag as Variant)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No
Called by GKMatchmakerMBS.queryPlayerGroupActivity when the search completes.

activity: The amount of activity in the player group.
error: If the search completed successfully, this parameter is nil; otherwise, this parameter holds an error object that describes the error that occurred.

GameKitMBS.receivedTurnEventForMatch(player as GKPlayerMBS, match as GKTurnBasedMatchMBS, didBecomeActive as boolean)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 15.0 ✅ Yes ❌ No ❌ No ❌ No
Activates the player’s turn. (required)

This method is called when the it becomes the player’s turn. It is also called when any of the following events happen:

  • The current turn has a time-out associated with it and the turn is about to expire.
  • Player accepts an invite from another player.
  • Turn was passed to another player. In this case, didBecomeActive is false.
  • Match data is saved by another player.
  • Player receives a reminder.

Available in OS X v10.10 and later.

GameKitMBS.recipientResponseHandler(MatchRequest as GKMatchRequestMBS, Player as GKPlayerMBS, response as Integer, tag as Variant)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 15.0 ✅ Yes ❌ No ❌ No ❌ No
This event is called whenever you programmatically invite specific players to join a match.

It is called once for each player invited to the match. Typically, your game uses the responses to update the custom user interface. For example, you want the player to be able to perform any of the following tasks:

  • Start the match.
  • Invite an additional set of specific players.
  • Use matchmaking to fill the remaining match slots.

Available in OS X v10.10 and later.

GameKitMBS.rematchCompleted(TurnMatch as GKTurnBasedMatchMBS, match as GKMatchMBS, error as NSErrorMBS, tag as Variant)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 13.0 ✅ Yes ❌ No ❌ No ❌ No
Called when GKMatchMBS.rematch completes.

match: The new match. If an error occurred, this parameter's value is nil.
error: If an error occurred, this parameter holds an error object that describes the problem. If the match was successfully recreated, this parameter's value is nil.

Available on Mac OS X 10.8.2 and newer.

GameKitMBS.remotePlayerDidCompleteChallenge(challenge as GKChallengeMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 13.0 ✅ Yes ❌ No ❌ No ❌ No
Called when a non-local player has completed a challenge issued by the local player.

Triggered by a push notification from the server. Received when a challenge notification banner is clicked, or while the game is running.
Available on Mac OS X 10.8.2 and newer.

GameKitMBS.removeCompleted(match as GKTurnBasedMatchMBS, error as NSErrorMBS, tag as Variant)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No
Called by GKTurnBasedMatchMBS.remove on completion.

If an error occurred, this error object describes the error. If the operation was completed successfully, the value is nil.
Tag is the parameter you passed to remove method.

GameKitMBS.reportAchievementCompleted(score as GKAchievementMBS, error as NSErrorMBS, tag as Variant)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No
Called by GKAchievementMBS.reportAchievement after the operation completes.

error: If the operation was successful, this value is nil; otherwise, this parameter holds an object that describes the problem that occurred.

GameKitMBS.reportAchievementsCompleted(achievements() as GKAchievementMBS, error as NSErrorMBS, tag as Variant)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 13.0 ✅ Yes ❌ No ❌ No ❌ No
Called when GKAchievementMBS.reportAchievements completes.

Available on Mac OS X 10.8.2 and newer.

GameKitMBS.reportScoreCompleted(score as GKScoreMBS, error as NSErrorMBS, tag as Variant)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No
Called by GKScoreMBS.reportScore after the score is reported.

error: If an error occurred, this parameter holds an error object that describes the problem. If the score was successfully reported, this parameter's value is nil.

GameKitMBS.reportScoresCompleted(Scores() as GKScoreMBS, error as NSErrorMBS, tag as Variant)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 13.0 ✅ Yes ❌ No ❌ No ❌ No
Reporting scores completed.

scores: An array of score objects to report to Game Center.
error: If an error occurred, this parameter holds an error object that describes the problem. If the score was successfully reported, this parameter's value is nil.

Available on Mac OS X 10.8.2 and newer.

GameKitMBS.resetAchievementsCompleted(error as NSErrorMBS, tag as Variant)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No
Called by GKAchievementMBS.resetAchievements when the reset action is completed.

error: If the operation was successful, this value is nil; otherwise, this parameter holds an object that describes the problem that occurred.

GameKitMBS.saveCurrentTurnWithMatchDataCompleted(match as GKTurnBasedMatchMBS, matchData as Dictionary, error as NSErrorMBS, tag as Variant)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 13.0 ✅ Yes ❌ No ❌ No ❌ No
The event to be called after the data is uploaded to Game Center.

error: If an error occurred, this error object describes the error. If the operation was completed successfully, the value is nil.
matchData: The game-specific state for the match.

Available on Mac OS X 10.8.2 and newer.

GameKitMBS.selectChallengeablePlayerIDsCompleted(Achievement as GKAchievementMBS, playerIDs() as string, challengeablePlayerIDs() as string, error as NSErrorMBS, tag as Variant)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 13.0 ✅ Yes ❌ No ❌ No ❌ No
Called by GKAchievementMBS.selectChallengeablePlayerIDs on completion

Available on Mac OS X 10.8.2 and newer.

GameKitMBS.setDefaultLeaderboardCategoryIDCompleted(LocalPlayer as GKLocalPlayerMBS, categoryID as string, error as NSErrorMBS, tag as Variant)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 13.0 ✅ Yes ❌ No ❌ No ❌ No
Called by GKLocalPlayerMBS.setDefaultLeaderboardCategoryID when completed.

Available on Mac OS X 10.8.2 and newer.

GameKitMBS.setDefaultLeaderboardCompleted(categoryID as string, error as NSErrorMBS, tag as Variant)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No
Called by GKLeaderboardMBS.setDefaultLeaderboard after the scores are retrieved from the server.

error: If an error occurred, this error object describes the error. If the operation was completed successfully, the value is nil.

GameKitMBS.shouldShowBannerForLocallyCompletedChallenge(challenge as GKChallengeMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 13.0 ✅ Yes ❌ No ❌ No ❌ No
Whether to show banner for locally completed challenge.

If the method returns true, a challenge banner (like an achievement or welcome banner -- not a notification center banner) is displayed. If false, then no banner is displayed. Default behavior for non-implementing apps is true.
Available on Mac OS X 10.8.2 and newer.

GameKitMBS.shouldShowBannerForLocallyReceivedChallenge(challenge as GKChallengeMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 13.0 ✅ Yes ❌ No ❌ No ❌ No
Whether to show banner for locally received challenge.

If the method returns true, a challenge banner (like an achievement or welcome banner -- not a notification center banner) is displayed when a challenge is received in-game for the local player. If false, then no banner is displayed, and localPlayerDidSelectChallenge will not be called for that challenge. Default behavior for non-implementing apps is true.

Available on Mac OS X 10.8.2 and newer.

GameKitMBS.shouldShowBannerForRemotelyCompletedChallenge(challenge as GKChallengeMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 13.0 ✅ Yes ❌ No ❌ No ❌ No
Whether to show banner for remotely completed challenge.

If the method returns true, a challenge banner (like an achievement or welcome banner -- not a notification center banner) is displayed. If false, then no banner is displayed. Default behavior for non-implementing apps is true.
Available on Mac OS X 10.8.2 and newer.

GameKitMBS.startBrowsingForNearbyPlayersCompleted(Matchmaker as GKMatchmakerMBS, playerID as string, reachable as boolean, tag as Variant)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 13.0 ✅ Yes ❌ No ❌ No ❌ No
Called when startBrowsingForNearbyPlayers method found a player.

Available on Mac OS X 10.8.2 and newer.

GameKitMBS.turnBasedMatchmakerViewControllerDidFailWithError(viewController as Variant, error as NSErrorMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No
Called when an error occurs. (required)

viewController: The view controller that received an error. (GKTurnBasedMatchmakerViewControllerMBS)
error: An error object that describes the error.

Your game should dismiss the view controller.

GameKitMBS.turnBasedMatchmakerViewControllerDidFindMatch(viewController as Variant, match as GKTurnBasedMatchMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No
Called when the player selected a match to view. (required)

viewController: The view controller that found a match. (GKTurnBasedMatchmakerViewControllerMBS)
match: The match that the player selected.

Your game should dismiss the view controller and use the match object to show the current state of the match to the player.

GameKitMBS.turnBasedMatchmakerViewControllerPlayerQuitForMatch(viewController as Variant, match as GKTurnBasedMatchMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No
Called when a player chooses to quit the match. (required)

viewController: The view controller that the player interacted with. (GKTurnBasedMatchmakerViewControllerMBS)
match: The match the player has chosen to quit.

When this method is called, the player is the current participant in the match, but that player has chosen to resign the match instead of taking a turn. Your game should dismiss the view controller, set an outcome for the player, and then call the match's participantQuitInTurnWithOutcome method.

GameKitMBS.turnBasedMatchmakerViewControllerWasCancelled(viewController as Variant)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No
Called when the player cancels matchmaking. (required)

viewController: The view controller that the player canceled. (GKTurnBasedMatchmakerViewControllerMBS)

Your game should dismiss the view controller.

Previous items

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


The biggest plugin in space...