loadData(completionHandler:)
Loads the game data from the file.
Declaration
func loadData(completionHandler handler: (@Sendable (Data?, (any Error)?) -> Void)? = nil)func loadData() async throws -> DataParameters
- handler:
The block that this method calls when it completes the request.
The block receives the following parameters:
- data
The data object that you saved to the file using the Savegamedata(_:withname:completionhandler:) method
- error
Describes an error if it occurs, or
nilif the operation completes.