MoEngageInAppDisplay
@objcMembers
public class MoEngageInAppDisplay : NSObject, NSCoding, Codable
A class that manages display settings and rules for in-app messages.
This class handles the visual presentation and timing of in-app campaigns,
including display rules, delays, and formatting. It conforms to NSCoding
and Codable protocols for data persistence and serialization.
-
Display rules for controlling when and where in-app messages are shown. These rules determine the conditions under which the message will be displayed.
Declaration
Swift
public let rules: MoEngageInAppDisplayRules -
Delay in seconds before showing the in-app message.
- A value of -1 means no delay (show immediately)
- A value of 0 or positive means wait that many seconds before showing
Declaration
Swift
public let delay: Int -
Default initializer for the display configuration.
Declaration
Swift
public override init()
-
Encodes the display configuration to an encoder.
Throws
Encoding errors if the data cannot be encoded.Declaration
Swift
public func encode(to encoder: any Encoder) throwsParameters
encoderThe encoder to write data to.
-
Initializes the display configuration from a decoder.
Throws
Decoding errors if the data is malformed.Declaration
Swift
required public init(from decoder: any Decoder) throwsParameters
decoderThe decoder to read data from.
-
Initializes the display configuration from an NSCoder for unarchiving.
Declaration
Swift
public required init?(coder: NSCoder)Parameters
coderThe coder to use for unarchiving.
Return Value
An initialized display configuration instance.
-
Encodes the display configuration using NSCoder for archiving.
Declaration
Swift
public func encode(with coder: NSCoder)Parameters
coderThe coder to use for archiving.