loadData(completionHandler:)
Retrieves the game data from the current game session.
Declaration
func loadData(completionHandler: @escaping @Sendable (Data?, (any Error)?) -> Void)func loadData() async throws -> DataParameters
- completionHandler:
A block that is called after the game session data has been loaded.
- data
A
Dataobject containing the app’s saved data.- error
If an error occurred, this parameter holds an error object that explains the error. Otherwise, the value of this parameter is nil. See
GameKit Constantsfor a list of error codes specific to GameKit.