uninstall(handler:)

Uninstalls the package.

Declaration

func uninstall(
    handler: (
        @Sendable
        (
            RemoveAction,
            inout Bool
        ) async -> Bool
    )
) async throws

Parameters

  • handler: Returns whether the action should be performed. Takes the action to be performed and a boolean that can be set to true to stop the whole uninstallation.

Discussion

The uninstaller calls handler before every action it performs, letting the client decide whether the RemoveAction should be performed or not.