AirshipAction
public protocol AirshipAction : AnyObject, Sendable
Airship action. Actions can be registered in the ActionRegistry
and ran through the ActionRunner
.
-
accepts(arguments:
Asynchronous) Called before an action is performed to determine if the the action can accept the arguments. This method can be used both to verify that an argument’s value is an appropriate type, as well as to limit the scope of execution of a desired range of values. Rejecting arguments will result in the action not being performed when it is run.
Declaration
Swift
func accepts(arguments: ActionArguments) async -> Bool
Return Value
YES if the action can perform with the arguments, otherwise NO
-
perform(arguments:
Asynchronous) Performs the action. You should not ordinarily call this method directly. Instead, use the
ActionRunner
.Declaration
Swift
func perform(arguments: ActionArguments) async throws -> AirshipJSON?
Return Value
An optional value.