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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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.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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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.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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
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 | Desktop only |
viewController: The view controller that the player canceled. (GKTurnBasedMatchmakerViewControllerMBS)
Your game should dismiss the view controller.
The items on this page are in the following plugins: MBS MacFrameworks Plugin.