Instance Method

player(_:hasConflictingSavedGames:)

Invoked when a conflict arises between different versions of the same saved game.

Declaration

optional func player(_ player: GKPlayer, hasConflictingSavedGames savedGames: [GKSavedGame])

Parameters

player

An object containing the current player’s information.

savedGames

An array of GKSavedGame objects containing the conflicting saved games.

Discussion

Saved game files conflict when multiple devices write to the same saved game file while one or more of the devices are offline. The app must determine which saved game data is the correct data to use and then call the resolveConflictingSavedGames(_:with:completionHandler:) method.