CustomEvent

Class

Declaration 

1@objc(SFMCSdkCustomEvent)
2public final class CustomEvent : NSObject, UserEvent
3
4public let id: String
5
6public let name: String
7
8public let category: EventCategory
9
10public let attributes: [String : Any]?
11
12public let userId: String?
13
14@objc
15public let priority: CustomEventPriority
16
17@objc
18public convenience init?(name: String, attributes: [String : Any]? = nil)

Cases 

id 

1public let id: String

name 

1public let name: String

category 

1public let category: EventCategory

attributes 

1public let attributes: [String : Any]?

userId 

1public 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.

1@objc
2public 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.

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