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
identityThe module’s identity (name and version), or
nilto omit version reportingmetadataOptional additional information (defaults to empty)
-
Well-known keys for the
metadatadictionary.Use these constants when populating
See moreInfo.metadataso that the SDK can locate and process the values it understands.Declaration
Swift
public enum MetaKeys