UserActionRunnerDelegate
public protocol UserActionRunnerDelegate : AnyObject
Methods for hooking into the lifecycle of actions performed by an action runner.
-
Tells the delegate that an action is about to be performed.
If your actions need app-specific data to be set on the action context, you can implement this method to set that data before the action runs.
This method is not called if the user cancels a destructive action.
Declaration
Swift
func actionRunner<A>(_ runner: UserActions.Runner, willPerformAction action: A, context: UserActions.Context<A>) where A : UserActionParameters
runnerThe action runner that is performing the action.
actionThe action that is being performed.
contextThe action context for this invocation of the action.
-
Tells the delegate that an action completed successfully.
This is called before the current event is sent, so any fields you set on the current event in your implementation will be included on the event for this action.
Declaration
Swift
func actionRunner<A>(_ runner: UserActions.Runner, didCompleteAction action: A, context: UserActions.Context<A>) where A : UserActionParameters
runnerThe action runner that performed the action.
actionThe action that was performed.
contextThe action context for this invocation of the action.
View on GitHub
UserActionRunnerDelegate Protocol Reference