MoEngageInAppFCTriggerType

public enum MoEngageInAppFCTriggerType : String, CaseIterable

Represents the different trigger types for Frequency Capping evaluation

This enum defines the various scenarios where FC rules can be applied:

  • sessionStart: When a new session begins
  • screenLoad: When a screen is loaded
  • customEvent: When a custom event is triggered
  • allCampaigns: Global evaluation for all campaigns

Each trigger type corresponds to specific FC rules in the global settings:

  • sessionStarts_s (session start) rule
  • screenLoads_l (screen load) rule
  • customEventc_e (custom event) rule
  • allCampaignsa_c (all campaigns) rule
  • Session start trigger - corresponds to s_s rule

    Declaration

    Swift

    case sessionStart = "session_start"
  • Screen load trigger - corresponds to s_l rule

    Declaration

    Swift

    case screenLoad = "screen_load"
  • Custom event trigger - corresponds to c_e rule

    Declaration

    Swift

    case customEvent = "custom_event"
  • All campaigns trigger - corresponds to a_c rule

    Declaration

    Swift

    case allCampaigns = "all_campaigns"
  • Returns the corresponding FC rule key for this trigger type

    Declaration

    Swift

    public var ruleKey: String { get }
  • Returns the corresponding FC error code for this trigger type (Priority stage) For Impression stage, use errorCodeForStage(isPriorityStage:) instead

    Declaration

    Swift

    public var errorCode: MoEngageInAppStatTypeSwift { get }
  • Returns the corresponding FC error code for this trigger type based on stage

    Declaration

    Swift

    public func errorCodeForStage(isPriorityStage: Bool) -> MoEngageInAppStatTypeSwift

    Parameters

    isPriorityStage

    True for Priority stage, false for Impression stage

    Return Value

    The appropriate error code for the stage

  • Stable integer value for Objective-C compatibility Maps enum cases to stable integers: sessionStart=0, screenLoad=1, customEvent=2, allCampaigns=3

    Declaration

    Swift

    public var intValue: Int { get }
  • Create trigger type from integer value (for Objective-C compatibility)

    Declaration

    Swift

    public static func from(intValue: Int) -> MoEngageInAppFCTriggerType?

    Parameters

    intValue

    The integer value (0=sessionStart, 1=screenLoad, 2=customEvent, 3=allCampaigns)

    Return Value

    The corresponding trigger type, or nil if invalid