CustomEvent

Class

Declaration

@objc(SFMCSdkCustomEvent)
public final class CustomEvent : NSObject, UserEvent

public let id: String

public let name: String

public let category: EventCategory

public let attributes: [String : Any]?

public let userId: String?

@objc
public let priority: CustomEventPriority

@objc
public convenience init?(name: String, attributes: [String : Any]? = nil)

Cases

id

public let id: String

name

public let name: String

category

public let category: EventCategory

attributes

public let attributes: [String : Any]?

userId

public let userId: String?

priority

Priority for this custom event (default: low). Read-only; can be used by MAM and other modules for handling. Only SFMCSDK can set this when creating events.

@objc
public let priority: CustomEventPriority

init(name:attributes:)

Creates a custom event with the given name and optional attributes. Priority is always low when using this initializer.

@objc
public convenience init?(name: String, attributes: [String : Any]? = nil)