Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

GKLocalPlayerMBS.authenticate(tag as Variant = nil)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GameKit MBS MacFrameworks Plugin 12.3 Yes No No Yes, macOS only No
Function: Prompts the player to confirm their identity.
This item is deprecated and should no longer be used. You can use SetAuthenticateHandler instead.
Notes:
When this method is called, it creates a new background task to handle the request. The method then returns control to your game. Later, when the task is complete, Game Kit calls GameKitMBS.authenticateCompleted event.

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.

If there is not an authenticated player on the device when your game calls this method, Game Kit displays a user interface that allows the player to sign in with their credentials (or to create a new account if he or she has never used Game Center). Your game should pause other activities that require user interaction (such as a real time game loop) before attempting to authenticate the local player.

Each time the completion handler is called, the data stored in the the GKLocalPlayer 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 completion handler must be prepared update any state of the game that assumes that a particular player is logged in if it discovers that the local player has changed. For more information, see "Authenticating the Local Player in a Multitasking Application" in Game Kit Programming Guide.

Deprecated in Mac OS X 10.9.

Feedback, Comments & Corrections

GKLocalPlayerMBS.Constructor
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GameKit MBS MacFrameworks Plugin 12.3 Yes No No Yes, macOS only No
Function: Creates new object pointing to the shared instance of the local player.

Feedback, Comments & Corrections

GKLocalPlayerMBS.friends as string()
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GameKit MBS MacFrameworks Plugin 12.3 Yes No No Yes, macOS only No
Function: A list of player identifiers for the local player's friends. (read-only)
Notes: This property is invalid until a call to loadFriends succeeds.

Feedback, Comments & Corrections

GKLocalPlayerMBS.loadDefaultLeaderboardCategoryID(tag as Variant = nil)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GameKit MBS MacFrameworks Plugin 13.0 Yes No No Yes, macOS only No
Function: Loads the category identifier for the local player's default leaderboard.
Notes:
Calls later GameKitMBS.loadDefaultLeaderboardCategoryIDCompleted event.

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

Available on Mac OS X 10.8.2 and newer.

Feedback, Comments & Corrections

GKLocalPlayerMBS.loadFriendPlayers(tag as Variant = nil)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GameKit MBS MacFrameworks Plugin 15.0 Yes No No Yes, macOS only No
Function: Retrieves a list of player identifiers for the local player’s friends.
Notes:
When this method is called, it creates a new background task to handle the request. The method then returns control to your game. Later, when the task is complete, Game Kit calls your completion handler. The completion handler is always called on the main thread.

Available in OS X v10.10 and later.
Calls later loadFriendPlayersCompleted event in GameKitMBS class.

Feedback, Comments & Corrections

GKLocalPlayerMBS.loadFriends(tag as Variant = nil)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GameKit MBS MacFrameworks Plugin 12.3 Yes No No Yes, macOS only No
Function: Retrieves a list of player identifiers for the local player's friends.
Notes:
When this method is called, it creates a new background task to handle the request. The method then returns control to your game. Later, when the task is complete, Game Kit calls GameKitMBS.loadFriendsCompleted.

Once this call is completed, the friends property is set to the same list of players returned in the completion event.

Feedback, Comments & Corrections

GKLocalPlayerMBS.SetAuthenticateHandler(tag as Variant = nil)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GameKit MBS MacFrameworks Plugin 13.0 Yes No No Yes, macOS only No
Function: Sets the handler called to process an authentication-related event with GameKitMBS.authenticateHandler.
Notes:
Calls later GameKitMBS.authenticateHandler.
Available on Mac OS X 10.8.2 and newer.

Feedback, Comments & Corrections

GKLocalPlayerMBS.setDefaultLeaderboardCategoryID(categoryID as string, tag as Variant = nil)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method GameKit MBS MacFrameworks Plugin 13.0 Yes No No Yes, macOS only No
Function: Sets the category identifier for the local player's default leaderboard.
Notes:
categoryID: The category ID string for one of your game's leaderboards.

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

The default leaderboard is configured in iTunes Connect as part of configuring your game's leaderboards. All players normally start with this leaderboard as the default leaderboard. Calling this method changes the default leaderboard only for the local player.

Available on Mac OS X 10.8.2 and newer.

Feedback, Comments & Corrections

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





Links
MBS Xojo PDF Plugins