Plugin
public protocol Plugin : CategoryTypeable, Resettable
CategoryPlugins implement the behavior defined by the category. The Plugin
protocol defines behavior common to
all plugins, but each category will also define client API behavior and optionally, plugin API behavior to describe
the contract to which the plugin must conform.
-
The key under which the plugin is registered in the Amplify configuration. Keys must be unique within the category configuration section.
Declaration
Swift
var key: PluginKey { get }
-
Configures the category plugin using
configuration
Throws
- PluginError.pluginConfigurationError: If the plugin encounters an error during configuration
Declaration
Swift
func configure(using configuration: Any?) throws
Parameters
configuration
The category plugin configuration for configuring the plugin. The plugin implementation is responsible for validating the incoming object, including required configurations, and handling potential conflicts with globally-specified options.