MoEngageInAppRequestFailureReason
@objc(MoEngageInAppRequestFailureReason)
public final class MoEngageInAppRequestFailureReason : MoEngageRequestFailureReason
Module-specific failure reason for MoEngageInApps failures emitted from the
typed-task API surface.
Customers inspect moduleCode first for an InApp-specific signal; if nil,
fall back to the base class’s code for shared cross-cutting handling
(e.g. .sdkNotInitialized when no instance is registered for the given
appId).
-
InApp-specific failure codes.
See moreDeclaration
Swift
@objc(MoEngageInAppRequestFailureReasonModuleCode) public enum ModuleCode : Int -
Non-
nilfor InApp-specific failures;nilwhen the reason used a shared base-classCode(e.g..sdkNotInitialized) instead.Declaration
Swift
@objc public let moduleCode: NSNumber? -
Identifier of the campaign that failed, when a specific campaign was identifiable at failure time. Non-
nilfor.renderFailedand.htmlAssetLoadFailed(a campaign was selected before the render-side failure, so the SDK has its id in hand).nilfor.campaignNotFound(no specific campaign exists) and for any shared-code failure (e.g..sdkNotInitialized) emitted before campaign selection runs.NSSecureCoding caveat: not preserved across encode/decode round-trips — see the Reason-subclass encoding limitation MARK in
MoEngageRequestFailure.swift. Customers needing post-decode access tocampaignIdshould hold the original failure reference.Declaration
Swift
@objc public let campaignId: String? -
Create an InApp-specific module failure reason for a non-campaign- specific failure (e.g.
.campaignNotFound).Declaration
Swift
@objc public init(moduleCode: ModuleCode)Parameters
moduleCodeThe InApp-specific module code.
-
Create an InApp-specific module failure reason carrying campaign identity — for
.renderFailed/.htmlAssetLoadFailedwhere the SDK knows which campaign was selected before the failure.Declaration
Swift
@objc public init(moduleCode: ModuleCode, campaignId: String?)Parameters
moduleCodeThe InApp-specific module code.
campaignIdIdentifier of the campaign whose render/load failed.
-
Create an InApp reason for a shared cross-cutting code emitted from within InApps (e.g.
.sdkNotInitializedwhen the instance lookup fails).Declaration
Swift
public override init(code sharedCode: MoEngageRequestFailureReason.Code)Parameters
sharedCodeA base-class
Codevalue. -
Declaration
Swift
public override var description: String { get }