MoEngageProperties
@objc
public class MoEngageProperties : NSObject, Codable
Class responsible to build attributes for event
-
Create
MoEngagePropertiesinstance with given attributedDictDeclaration
Swift
@objc public init(withAttributes attributesDict: [String : Any]? = nil)Parameters
attributesDictattributes dict for the event
-
Add an attribute to
MoEngagePropertiesDeclaration
Swift
@objc public func addAttribute(_ attrVal: Any?, withName attrName: String)Parameters
attrValattribute value
attrNameattribute name
-
Add Location attribute to
MoEngagePropertiesDeclaration
Swift
@objc public func addLocationAttribute(_ attrVal: MoEngageGeoLocation, withName attrName: String)Parameters
attrVallocation attribute of type
MoEngageGeoLocationattrVallocation attribute of type
MoEngageGeoLocationattrNameattribute name
-
Add date attribute to
MoEngagePropertiesDeclaration
Swift
@objc public func addDateAttribute(_ attrVal: Date, withName attrName: String)Parameters
attrValvalue of type
DateattrNameattribute name
-
Add ISO date attribute to
MoEngagePropertiesNote
ISO format accepted yyyy-MM-dd’T'HH:mm:ss.SSS'Z’ / yyyy-MM-dd’T'HH:mm:ss'Z’Declaration
Swift
@objc public func addDateISOStringAttribute(_ dateString: String, withName attrName: String)Parameters
dateStringISO date string
attrNameattribute value
-
Add Epoch Date attribute to
MoEngagePropertiesDeclaration
Swift
@objc public func addDateEpochAttribute(_ epoch: Double, withName attrName: String)Parameters
epochDate attribute of type Double
attrNameattribute name
-
Set the event as non-interactive.
Declaration
Swift
@objc public func setNonInteractive()
-
Declaration
Swift
public required init(from decoder: Decoder) throws -
Declaration
Swift
public func encode(to encoder: any Encoder) throws -
Declaration
Swift
public override func isEqual(_ object: Any?) -> Bool