Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

GKMatchMBS class

Type Topic Plugin Version macOS Windows Linux Console & Web iOS
class GameKit MBS MacFrameworks Plugin 12.3 Yes No No Yes, macOS only No
Function: A GKMatch object provides a peer-to-peer connection between a group of players that are connected through Game Center.
Notes:
Matches provide both data and voice services. Your application never directly allocates GKMatch objects. Instead, your application uses the GKMatchmaker class to programmatically find a match with other interested players or a GKMatchmakerViewController object to display a user interface to the player.

After your application receives a match object, you must set a delegate and then wait until the other participants are connected to the match. You can read the expectedPlayerCount property to determine how many players have not connected to the match.

Your application transmits data to other players by calling either the sendDataToAllPlayers method or the sendDataToPlayer method. To transmit and receive voice data, call voiceChatWithName to create one or more voice channels.

When you are finished with the match, call the match's disconnect method.

Feedback, Comments & Corrections

Match State Constants

Constant Value Description
GKPlayerStateConnected 1 Connected to the match.
GKPlayerStateDisconnected 2 Disconnected from the match.
GKPlayerStateUnknown 0 Initial player state.

This class has no sub classes.

Some methods using this class:

Some events for this class:


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


GKMatchmakerViewControllerMBS   -   GKMatchRequestMBS




Links
MBS Xojo Plugins