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:
sessionStart→s_s(session start) rulescreenLoad→s_l(screen load) rulecustomEvent→c_e(custom event) ruleallCampaigns→a_c(all campaigns) rule
-
Session start trigger - corresponds to
s_sruleDeclaration
Swift
case sessionStart = "session_start" -
Screen load trigger - corresponds to
s_lruleDeclaration
Swift
case screenLoad = "screen_load" -
Custom event trigger - corresponds to
c_eruleDeclaration
Swift
case customEvent = "custom_event" -
All campaigns trigger - corresponds to
a_cruleDeclaration
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:)insteadDeclaration
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) -> MoEngageInAppStatTypeSwiftParameters
isPriorityStageTrue 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
intValueThe integer value (0=sessionStart, 1=screenLoad, 2=customEvent, 3=allCampaigns)
Return Value
The corresponding trigger type, or nil if invalid