Info

struct Info

Metadata about a module including its name, version, and additional information.

This type provides structured information about SDK modules for:

  • Version tracking: Which module versions are integrated
  • Debugging: Identifying active modules in logs
  • Analytics: Reporting module usage to the backend
  • Configuration: Storing module-specific metadata

Payload Generation

When multiple modules are collected, they can be converted to a network payload format for reporting to the MoEngage backend.

Example

let info = MoEngageModule.Info(
    name: "cards",
    version: "2.1.0",
    metadata: ["cardTypes": ["carousel", "stack"]]
)
  • The module’s identity containing its name and version.

    When nil, the module does not report version information to the backend.

    Declaration

    Swift

    public let identity: Identity?
  • Additional metadata specific to the module

    This can include:

    • Feature flags
    • Configuration settings
    • Capability information
    • Dependencies

    Declaration

    Swift

    public let metadata: [String : Any]
  • Creates a new module info instance.

    Declaration

    Swift

    public init(identity: Identity? = nil, metadata: [String : Any] = [:])

    Parameters

    identity

    The module’s identity (name and version), or nil to omit version reporting

    metadata

    Optional additional information (defaults to empty)

  • Well-known keys for the metadata dictionary.

    Use these constants when populating Info.metadata so that the SDK can locate and process the values it understands.

    See more

    Declaration

    Swift

    public enum MetaKeys

Info.Identity

  • Identifies a module by name and version.

    See more

    Declaration

    Swift

    struct Identity