ModuleCode
@objc(MoEngageInAppRequestFailureReasonModuleCode)
public enum ModuleCode : Int
InApp-specific failure codes.
-
No eligible in-app campaign was shown for this request — generic “nothing was shown” signal. Covers no-eligible-campaign-available, no-campaign-after-eligibility, blocked-in-current-view-controller, and multi-cause SDK-internal cancellation paths (background, logout, workspace reset). More precise codes carve out specific sub-cases:
.anotherCampaignActivefor “another in-app already visible”,.evaluationFailedfor post-selection evaluation rejections (final-rule check, pre-attach guards, runtime UI state).Declaration
Swift
case campaignNotFound -
The selected native (non-HTML) campaign’s payload couldn’t be fetched before the render attempt. Does NOT cover UI-creation failures inside the show pipeline — see
MoEngageShowInAppResultfor the show-attempt vs visible-render distinction; UI-creation failures currently resolve as.selected(not surfaced as failure) because the SDK’s render machinery completion is() -> Voidand can’t distinguish them.Declaration
Swift
case renderFailed -
The selected HTML campaign’s assets couldn’t be loaded (network / parse failure during HTML payload fetch). Same UI-creation caveat as
.renderFailed.Declaration
Swift
case htmlAssetLoadFailed -
A later
showInApp/showNudgecall superseded this one before the SDK could process it. The later call is the one the SDK will attempt to render; this earlier call was displaced from the cache slot. Typically arises when the customer issues multiple show calls before the SDK’s initial meta sync completes. Not an integration error — customers usually ignore this case.Declaration
Swift
case duplicateFunctionCall -
The last meta-sync attempt failed explicitly (network / server / parse failure). Subsequent
showInApp/showNudgecalls reject with this code until a sync succeeds. In-flight or not-started syncs leave the task pending — only an explicit terminal failure triggers this rejection. Customer can retry on the next user action; the SDK will attempt a fresh meta-sync on the next lifecycle trigger.Declaration
Swift
case metaFetchFailed -
Customer’s
showInApp/showNudgecould not display because another in-app campaign is currently being processed or visible on screen. The SDK declines to stack a second in-app on top of the active one. Customer can retry once the active in-app dismisses.Declaration
Swift
case anotherCampaignActive -
An eligible campaign was selected but rejected by a post-selection evaluation step. Covers final-rule check failures, pre-attach guard failures (wrong template type), runtime UI-state blocks (keyboard visible), and other evaluation-time rejections. Distinct from
.campaignNotFound(no campaign existed) and.anotherCampaignActive(another in-app already on screen).Declaration
Swift
case evaluationFailed