CustomEvent

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

    Declaration

    Swift

    public let id: String
  • Declaration

    Swift

    public let name: String
  • Declaration

    Swift

    public let category: EventCategory
  • Declaration

    Swift

    public let attributes: [String : Any]?
  • Declaration

    Swift

    public let userId: String?
  • 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.

    Declaration

    Swift

    @objc
    public let priority: CustomEventPriority
  • Creates a custom event with the given name and optional attributes. Priority is always low when using this initializer.

    Declaration

    Swift

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

    Parameters

    name

    Event name (cannot be empty, whitespace-only, or start with $).

    attributes

    Optional key-value attributes (keys must not start with $ or contain .).