Skip to main content

iOS - Access Module Invocation Data

note

Modules conforming to MethodModule or UIModule interfaces can access runtime invocation parameters via the ModuleInvocationData instance. :::

When a module is invoked from the Tecton layer or host application, it receives an instance of ModuleInvocationData containing key-value pairs passed at runtime.

Accessing Runtime Parameters

The moduleInvocationData object exposes a runtimeParams dictionary. Use this to retrieve values passed during invocation.

Example

Assume the module is invoked from a web context with the following JSON:

{
"server": "prod"
}

You can access the value in your module like this:

Accessing Runtime Parameter
let server = moduleInvocationData.runtimeParams["server"] as? String

This allows your module to behave dynamically based on runtime data passed during invocation.