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

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.