Platforms to show: All Mac Windows Linux Cross-Platform
Back to GameKitMBS class.
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 |
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 |
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 |
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 |
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 |
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.
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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.
The items on this page are in the following plugins: MBS MacFrameworks Plugin.