deleteSavedGames(withName:completionHandler:)
Deletes saved games with the specified filename.
Declaration
func deleteSavedGames(withName name: String, completionHandler handler: (@Sendable ((any Error)?) -> Void)? = nil)func deleteSavedGames(withName name: String) async throwsParameters
- name:
A string that identifies the saved game data to delete.
- handler:
The block that this method calls when it completes the request.
The block receives the following parameters:
- error
Describes an error if it occurs, or
nilif the operation completes.
Mentioned in
Discussion
Alternatively, use the resolveConflictingSavedGames(_:with:completionHandler:) method to keep one of the saved games that use the same filename.