Platforms to show: All Mac Windows Linux Cross-Platform

Back to GameKitMBS class.

Next items

GameKitMBS.acceptInviteCompleted(match as GKTurnBasedMatchMBS, 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 match is successfully created.

match: A newly initialized match object that contains a list of players for the match. If an error occurred, this value is nil.
error: If an error occurred, this error object describes the error. If the operation was completed successfully, the value is nil.

Called by GKTurnBasedMatchMBS.acceptInvite.
Available on Mac OS X 10.8.2 and newer.

GameKitMBS.achievementViewControllerDidFinish(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 dismisses the achievements screen. (required)

viewController: The achievement view controller whose interface was dismissed by the player. (GKAchievementViewControllerMBS)

Your should dismiss the view controller. If your game paused any gameplay or other activities, it can restart those services in this method.

GameKitMBS.addPlayersToMatchCompleted(MatchMaker as GKMatchmakerMBS, match as GKMatchMBS, matchRequest as GKMatchRequestMBS, 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.addPlayersToMatch when matchmaking completes.

error: If matchmaking was successful, this parameter contains nil. Otherwise, this parameter holds an error object that describes the error that occurred.

GameKitMBS.authenticateCompleted(localPlayer as GKLocalPlayerMBS, 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 GKLocalPlayerMBS.authenticate when the player has authenticated or when an error occurs.

error: This parameter is nil if the player successfully authenticated. Otherwise, it contains an error object that describes the error that occurred.

Some examples using this event:

GameKitMBS.authenticateHandler(LocalPlayer as GKLocalPlayerMBS, viewController as NSViewControllerMBS, error as NSErrorMBS, tag as Variant, viewControllerHandle as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 13.0 ✅ Yes ❌ No ❌ No ❌ No
The event called when game center needs authentication.

viewController: This parameter is nil if the authentication process is complete. Otherwise, it contains a view controller that your game should display to the player.
error: This parameter contains an error object that describes any error that occurred.

Your game should authenticate the player as early as possible after launching, ideally as soon as you can present a user interface to the player. For example, your game may be launched because the player accepted an invitation to join a match or to take a turn in a turn-based match, so you want your game to authenticate the player and process the match invitation as quickly as possible. After you set a handler, authentication begins automatically and is repeated when your game moves to the background and then back to the foreground.

During the authentication process, Game Kit calls your handler one or more times to handle specific authentication events. Your handler must handle three kinds of events:

  • If the device does not have an authenticated player, Game Kit passes a view controller to your authenticate handler. When presented, this view controller displays the authentication user interface. Your game should pause other activities that require user interaction (such as your game loop), present this view controller and then return. When the player finishes interacting with it, the view controller is dismissed automatically.
  • If the authentication process succeeded, theGKLocalPlayer singleton object's authenticated property is set to true and the object's other properties are set to match those of the connected player.
  • If the authentication process failed, the GKLocalPlayer singleton object's authenticated property is set to false and the object's other properties are cleared.
Each time the authentication handler is called, the data stored in the local player singleton object may have changed. A new player may have logged into the device or the player may have simply logged out from Game Center. Because of both of these possibilities, your authentication handler must be prepared to update any other objects that assume that a particular player is logged in. For more information, see "Authenticating the Local Player in a Multitasking Application" in Game Center Programming Guide.

Available on Mac OS X 10.8.2 and newer.

Some examples using this event:

GameKitMBS.challengesViewControllerDidFinish(viewController as Variant)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 13.0 ✅ Yes ❌ No ❌ No ❌ No
The challengesViewController did finish.

Called by GKChallengesViewControllerMBS if needed.
Available on Mac OS X 10.8.2 and newer.

GameKitMBS.chooseBestHostPlayerCompleted(match as GKMatchMBS, playerID as string, 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.chooseBestHostPlayer completes.

playerID: The player identifier for the player with the best estimated network performance, or nil if a player could not currently be determined.

Available on Mac OS X 10.8.2 and newer.

GameKitMBS.declineInviteCompleted(match as GKTurnBasedMatchMBS, 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 match is successfully created.

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

Called by GKTurnBasedMatchMBS.declineInvite.
Available on Mac OS X 10.8.2 and newer.

GameKitMBS.didRequestMatchWithOtherPlayers(players() as GKPlayerMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 15.0 ✅ Yes ❌ No ❌ No ❌ No
Initiates a match from Game Center with the requested players. (required)

player: The GKPlayer object containing the current player’s information.
playersToInvite: An array of GKPlayer objects containing the player identifiers to invite to the match.

When this method is called, you should create a new match using the player identifiers provided and present a GKTurnBasedMatchmakerViewController.

Available in OS X v10.10 and later.

GameKitMBS.endMatchInTurnWithMatchDataCompleted(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 12.3 ✅ Yes ❌ No ❌ No ❌ No
Called by GKTurnBasedMatchMBS.endMatchInTurnWithMatchData after the match is successfully ended.

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

GameKitMBS.endTurnWithNextParticipant(match as GKTurnBasedMatchMBS, nextParticipant as GKTurnBasedParticipantMBS, matchData as Dictionary, 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.endTurnWithNextParticipant after the data is uploaded to Game Center.

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

GameKitMBS.endTurnWithNextParticipantsCompleted(match as GKTurnBasedMatchMBS, 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.findMatchForRequestCompleted(MatchMaker as GKMatchmakerMBS, request as GKMatchRequestMBS, match as GKMatchMBS, TurnBasedMatch 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 when the match has been created.

This is either called by GKMatchmakerMBS.findMatchForRequest or GKTurnBasedMatchMBS.findMatchForRequest.

match: If matchmaking was successful, this parameter contains the created match. Otherwise, this parameter is nil.
error: If matchmaking was successful, this parameter contains nil. Otherwise, this parameter holds an error object that describes the error that occurred.

GameKitMBS.findPlayersForHostedMatchRequestCompleted(MatchMaker as GKMatchmakerMBS, request as GKMatchRequestMBS, playerIDs() 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 GKMatchmakerMBS.findPlayersForHostedMatchRequest when the match has been created.

players: If matchmaking was successful, this parameter contains an array of players to connect into the match. Otherwise, this parameter is nil.
error: If matchmaking was successful, this parameter contains nil. Otherwise, this parameter holds an error object that describes the error that occurred.

GameKitMBS.friendRequestComposeViewControllerDidFinish(viewController as Variant)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No
The compose view has finished.

viewController: The GKFriendRequestComposeViewControllerMBS object.

GameKitMBS.gameCenterViewControllerDidFinish(gameCenterViewController as Variant)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 13.0 ✅ Yes ❌ No ❌ No ❌ No
Called when gameCenterViewController did finish.

Available on Mac OS X 10.8.2 and newer.

GameKitMBS.handleInviteFromGameCenter(playersToInvite() as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No
Sent when the local player receives an invitation to join a new turn-based match.

playersToInvite: An array of player identifiers for the players to initially invite to the game.

When you receive this message, your game should create a new GKMatchRequestMBS object and assign the playersToInvite parameter to the match request's playersToInvite property. Then, your game can either call the GKTurnBasedMatchMBS class method findMatchForRequest to find a match programmatically or it can use the request to instantiate a new GKTurnBasedMatchmakerViewControllerMBS object to show a user interface to the player.

GameKitMBS.handleMatchEnded(match as GKTurnBasedMatchMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No
Sent when a match the local player is participating in has ended.

match: The match that just ended.

When you receive this message, it should display the match's final results to the player and allow the player the option of saving or removing the match data from Game Center.

GameKitMBS.handleTurnEventForMatch(match as GKTurnBasedMatchMBS, didBecomeActive as boolean)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No
Sent when it is the local player's turn to act in a turn-based match.

match: A match object containing the current state of the match.

When you receive this message, the player has accepted a push notification for a match already in progress. Your game should end whatever task it was performing and switch to the match information provided by the match object. For more information on handling player actions in a turn-based match, see GKTurnBasedMatch Class Reference.

didBecomeActive: New parameter valid on Mac OS X 10.8.2 and newer.

GameKitMBS.Invited(MatchMaker as GKMatchmakerMBS, acceptedInvite as GKInviteMBS, playersToInvite() as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No
Called by GKMatchmakerMBS when an invitation is received from another player.

acceptedInvite: The invitation accepted by the player.
playersToInvite: A list of player identifiers for additional players to invite into the game.

An game responds to an invitation by allocating and initializing a GKMatchmakerViewControllerMBS object, passing the invitation object and the list of player identifiers as parameters. For more information, see Game Kit Programming Guide.

If your game receives an invitation while your game is running, it should clean up any existing gameplay (including disconnecting from any current matches) and then process the invitation.

GameKitMBS.inviteeResponseHandler(MatchRequest as GKMatchRequestMBS, PlayerID as string, response as Integer, 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 called when an response from an invited player is returned to your game.

playerID: The identifier for the player.
response: The nature of the response. See GKInviteeResponse* constants.

Available on Mac OS X 10.8.2 and newer.

GameKitMBS.leaderboardViewControllerDidFinish(viewController as Variant)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No
The leaderboard view has finished.

viewController: The GKLeaderboardViewControllerMBS object.

GameKitMBS.loadAchievementDescriptionsCompleted(achievements() as GKAchievementDescriptionMBS, 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 GKAchievementDescriptionMBS.loadAchievementDescriptions when the download is completed.

descriptions: An array of description objects for the achievements in your game. If an error occurred, this value may be non-empty. In this case, the array holds whatever descriptions were downloaded by Game Kit before the error occurred.
error: If an error occurred, this error object describes the error. If the operation completed successfully, this value is nil.

GameKitMBS.loadAchievementsCompleted(achievements() 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.loadAchievements when the download is completed.

achievements: An array of achievement objects that represents all progress reported to Game Center for the local player. If an error occurred, this parameter may be non-empty, in which case the array holds whatever achievement information Game Kit was able to fetch.
error: If an error occurred, this object describes the error. If the operation completed successfully, this value is nil.

GameKitMBS.loadCategoriesCompleted(categories() as string, titles() 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.loadCategories when the categories have been retrieved from the server.

categories: An array of strings that provides the categories to your game. If an error occurred, this value may be non-empty. In this case, the array holds whatever data Game Kit was able to download before the error occurred.
titles: An array of strings that provides localized titles for each category. If an error occurred, this value may be non-empty. In this case, the array holds whatever data Game Kit was able to download before the error occurred.
error: If an error occurred, this error object describes the error. If the operation completed successfully, the value is nil.

GameKitMBS.loadDefaultLeaderboardCategoryIDCompleted(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
The loadDefaultLeaderboardCategoryID method completed.

categoryID: The category ID string for the local player's default leaderboard.
error: If an error occurred, this parameter holds an error object that explains the error. Otherwise, the value of this parameter is nil.

Available on Mac OS X 10.8.2 and newer.

GameKitMBS.loadFriendPlayersCompleted(localPlayer as GKLocalPlayerMBS, friendPlayers() as GKPlayerMBS, error as NSErrorMBS, tag as Variant)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 15.0 ✅ Yes ❌ No ❌ No ❌ No
The event called by GKLocalPlayerMBS.loadFriendPlayers.

friendPlayers: An array of GKPlayer objects containing the player identifiers for the players that are friends of the local player. If an error occurred, this value can be non-nil. In that case, the array contains the data that Game Kit was able to download before the error occurred.
error: If an error occurred, this parameter holds an error object that explains the error. Otherwise, the value of this parameter is nil.

GameKitMBS.loadFriendsCompleted(localPlayer as GKLocalPlayerMBS, friends() 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 GKLocalPlayerMBS.loadFriends when the request completes.

friends: An array of player identifiers for the players that are friends of the local player. If an error occurred, this value can be non-empty. In that case, the array contains the data that Game Kit was able to download before the error occurred.
error: If an error occurred, this parameter holds an error object that explains the error. Otherwise, the value of this parameter is nil.

GameKitMBS.loadImageCompleted(description as GKAchievementDescriptionMBS, image as NSImageMBS, 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 GKAchievementDescriptionMBS.loadImage when the download is completed.

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

GameKitMBS.loadLeaderboardsCompleted(Leaderboards() as GKLeaderboardMBS, 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
Leaderboards have been loaded.

Available on Mac OS X 10.8.2 and newer.

GameKitMBS.loadMatchDataCompleted(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 12.3 ✅ Yes ❌ No ❌ No ❌ No
Called by GKTurnBasedMatchMBS.loadMatchData after the match data has been retrieved from the server.

matchData: The data stored on Game Center that reflects the current state of the match. If an error occurred, this value is nil.
error: If an error occurred, this error object describes the error. If the operation was completed successfully, the value is nil.

GameKitMBS.loadMatchesCompleted(matches() 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.loadMatches after the matches are retrieved from the server.

matches: An array of match objects that hold the requested matches. If an error occurred, this value may be non-empty. In this case, the array holds whatever match data could be retrieved from Game Center before the error occurred.
error: If an error occurred, this error object describes the error. If the operation was completed successfully, the value is nil.

GameKitMBS.loadMatchWithIDCompleted(TurnBasedMatch as GKTurnBasedMatchMBS, matchID 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
The event to be called after the match is retrieved from the server.

Called when GKTurnBasedMatchMBS.loadMatchWithID finishes.

matchID: The identifier for the turn-based match.
match: If the operation completed successfully, this parameter holds the match. If an error occurred, the value is nil.
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.loadPhotoForSizeCompleted(player as GKPlayerMBS, size as Integer, photo as NSImageMBS, 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 GKPlayerMBS.loadPhotoForSize when the player data is retrieved from Game Center.

photo: An image for the player. If an error occurred, this may still be non-nil. In this case, the image reflects an image cached by Game Kit on the device.
error: If an error occurred, this error object describes the error. If the operation completed successfully, this is nil.

GameKitMBS.loadPlayersForIdentifiersCompleted(identifiers() as string, players() as GKPlayerMBS, 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 GKPlayerMBS.loadPlayersForIdentifiers when the player data is retrieved from Game Center.

players: An array of GKPlayer objects, one per identifier. If an error occurred, this may be non-empty. In that case, the array holds whatever data Game Kit was able to retrieve for the requested players.
error: If an error occurred, this error object describes the error. If the operation completed successfully, this is nil.

GameKitMBS.loadReceivedChallengesCompleted(challenges() as GKChallengeMBS, 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 loadReceivedChallenges finished.

challenges: An array of challenge objects that represents all challenges made to the local player. If an error occurred, this parameter may be non-nil, in which case the array holds whatever challenge information Game Kit was able to fetch.
error: If an error occurred, this object describes the error. If the operation completed successfully, this value is nil.

Available on Mac OS X 10.8.2 and newer.

GameKitMBS.loadScoresCompleted(Leaderboard as GKLeaderboardMBS, scores() 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 GKLeaderboardMBS.loadScores after the scores are retrieved from the server.

scores: An array of score objects that hold the requested scores. If an error occurred, this value may be non-nil. In this case, the array holds whatever score data could be retrieved from Game Center before the error occurred.
error: If an error occurred, this error object describes the error. If the operation was completed successfully, the value is nil.

GameKitMBS.localPlayerDidCompleteChallenge(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 the local player has completed one of their challenges, triggered by a push notification from the server.

Received only while the game is running.
Available on Mac OS X 10.8.2 and newer.

GameKitMBS.localPlayerDidReceiveChallenge(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 the local player has received a challenge, triggered by a push notification from the server.

Received only while the game is running.
Available on Mac OS X 10.8.2 and newer.

GameKitMBS.localPlayerDidSelectChallenge(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 the user clicks a challenge notification banner or the "Play Now" button for a challenge inside Game Center, causing the game to launch.

Also called when the user clicks a challenge banner inside the game.
Available on Mac OS X 10.8.2 and newer.

GameKitMBS.matchConnectionWithPlayerFailed(match as GKMatchMBS, playerID as string, 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 the match fails to connect to a player.

match: The match that received the error.
player: The identifier for the player whose connection failed.
error: The error that occurred.

This method is called if the match was unable to send a transmission to another player in the match.

GameKitMBS.matchDidChangeState(match as GKMatchMBS, playerID as string, state as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 12.3 ✅ Yes ❌ No ❌ No ❌ No
Called when a player connects to or disconnects from the match.

match: The match that the player is connected to.
player: The identifier for the player whose state changed.
state: The state the player moved to. (see constants in GKMatchMBS)

Your game implements this method to be notified when players connect to or disconnect from the match.one

GameKitMBS.matchDidFailWithError(match as GKMatchMBS, 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 the match cannot connect to any other players.

match: The match that received the error.
error: The error that occurred.

This method is called if the match cannot connect to any other players associated with the match. It usually means a serious networking error has occurred.

GameKitMBS.matchDidReceiveData(match as GKMatchMBS, data as Dictionary, 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 data is received from a player. (required)

match: The match that received the data.
data: The data sent by the player.
player: The string identifier for the player that sent the data.

Important: Data received from other players should be treated as untrusted data. Be sure to validate the data you receive from the match and write your code carefully to avoid security vulnerabilities. See the Secure Coding Guide for more information.

GameKitMBS.matchEnded(player as GKPlayerMBS, match as GKTurnBasedMatchMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
event GameKit MBS MacFrameworks Plugin 15.0 ✅ Yes ❌ No ❌ No ❌ No
Called when the match has ended. (required)

player: The GKPlayer object containing the current player’s information.
match: The GKTurnBasedMatch object containing the current game data.

Available in OS X v10.10 and later.

GameKitMBS.matchForInviteCompleted(Matchmaker as GKMatchmakerMBS, invite as GKInviteMBS, 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 by matchForInvite on completion.

Match provides the new match object on success.

Possible reasons for error:
1. Communications failure.
2. Invite cancelled.
Available on Mac OS X 10.8.2 and newer.

GameKitMBS.matchmakerViewControllerDidFailWithError(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 the view controller encounters an unrecoverable error. (required)

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

GameKitMBS.matchmakerViewControllerDidFindMatch(viewController as Variant, match as GKMatchMBS)

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

viewController: The view controller that performed the matchmaking. (GKMatchmakerViewControllerMBS)
match: A completed match.

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

Next items

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


The biggest plugin in space...