Game-specific data that reflects the details of the match.
- iOS 5.0+
- macOS 10.8+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 3.0+
Although Game Center knows who is participating in the match and who is expected to act next, it does not know anything about your game’s internal logic. Your game provides the match data and all the programming logic required to interpret it. This data should include the current state of the game and provide any necessary details about what actions the current player is expected to take. It can also be helpful for your game to record information about recent moves made by other players. The game can then replay those moves visually for the player to show exactly how the match reached the state it is in now.
Your game never directly updates the match state associated with this property. Instead, when the data is updated to reflect the actions of the current player, your game serializes the updated state into memory and calls one of the match’s instance methods that transmit the updated state to Game Center.
The value of this property is
nil until after your game calls the
load method and the load task is complete. After this task completes, the
match property holds the data that the last player to act transmitted to Game Center.