Ends the match while submitting all of the scores and achievements.
- iOS 7.0+
- macOS 10.10+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 3.0+
A serialized blob of data reflecting the current state for the match. Do not pass
nilas an argument.
An array of
GKScoreobjects containing the final scores for every participant in the match.
An array of
GKAchievementobjects containing the achievements acquired by each participant in the match.
A block to be called after the scores are saved to the server.
The block receives the following parameters:
If an error occurred, this error object describes the error. If the operation was completed successfully, the value is
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.
This method ends the current match and submits scores and achievements for all of the participants. The scores can submitted to multiple leaderboards. The
GKTurn status must be set for each participant before calling this method.