MoEngageInAppFCMeta

@objcMembers
public class MoEngageInAppFCMeta : NSObject, NSCoding, Codable

A class that manages frequency capping metadata for in-app campaigns.

This class controls how often in-app messages can be displayed to users, including maximum display counts, minimum delays between displays, and whether to ignore global delay settings. It conforms to NSCoding and Codable protocols for data persistence and serialization.

  • Flag indicating whether to ignore global delay settings. When true, only the local minDelay setting is considered.

    Declaration

    Swift

    public let ignoreGlobalDelay: Bool
  • Maximum number of times the in-app message can be displayed.

    • A value of -1 means unlimited displays
    • A value of 0 or positive means limit to that number of displays

    Declaration

    Swift

    public let maxCount: Int
  • Minimum delay in seconds between consecutive displays of the in-app message. This prevents the message from being shown too frequently.

    Declaration

    Swift

    public let minDelay: Int
  • Flag indicating whether to ignore global FC settings If true, global FC settings will be ignored for the campaign evaluation

    Declaration

    Swift

    public let ignoreGlobalFC: Bool
  • Flag indicating whether to ignore global FC count This key will be considered only when the ignoreGlobalFC (ignore_global_fc_settings) is true. Default value is false; if true, the FC settings count will be updated.

    Declaration

    Swift

    public let ignoreFCCount: Bool
  • Initializes the frequency capping metadata from a dictionary.

    Declaration

    Swift

    public init(dictionary dict: [String : Any]?)

    Parameters

    dict

    Dictionary containing frequency capping configuration. If nil or empty, default values will be used.

Codable

  • Initializes the frequency capping metadata from a decoder.

    Throws

    Decoding errors if the data is malformed.

    Declaration

    Swift

    public required init(from decoder: Decoder) throws

    Parameters

    decoder

    The decoder to read data from.

  • Encodes the frequency capping metadata to an encoder.

    Throws

    Encoding errors if the data cannot be encoded.

    Declaration

    Swift

    public func encode(to encoder: Encoder) throws

    Parameters

    encoder

    The encoder to write data to.

NSCoding

  • Initializes the frequency capping metadata from an NSCoder for unarchiving.

    Declaration

    Swift

    public required init?(coder: NSCoder)

    Parameters

    coder

    The coder to use for unarchiving.

    Return Value

    An initialized frequency capping metadata instance.

  • Encodes the frequency capping metadata using NSCoder for archiving.

    Declaration

    Swift

    public func encode(with coder: NSCoder)

    Parameters

    coder

    The coder to use for archiving.