Data Output

Data outputs hold the data that is sent from components to the platform

Overview

Data outputs are formed in the component and hold the data that is going to be passed to the platform along with information about the component that the data is being sent from as well as the unique output. The data outputs holds the underlying data in the type erased AnyCloneableData

AnyCloneableData

Swift Structure

The following is the structure of the Data Output along with the initialize for reference on how to create the Data Output in your component

public struct DataOutput: CloneableDataOutput {   
    public init(
        data: AnyCloneableData, 
        staticComponentID: String, // use value passed during component init
        dynamicComponentID: String, // use value passed during component init
        dynamicOutputID: String, // hard-code, or get from component outputs
        outputComponentType: ComponentType) // define in the following enum
}

See: ComponentType for reference to available component types

Last updated