PrivMX DOCS
API Reference/PrivMX Endpoint Swift Extra/Events

privmx.endpoint.event.ContextCustomEvent

Holds data of event that arrives when custom context event is emitted.

Static Methods

typeStr()

Returns the event type as a string. This method returns the constant string "contextCustom", identifying the type of this event as contextCustom.

public static func typeStr() -> String

Returns

String · A String representing the event type, in this case, "contextCustom".

Methods

handleWith(cb:)

Handles the event by calling the provided callback with an optional argument. This implementation passes the data property to the callback.

Params

cb

(@escaping @Sendable @MainActor (Any?) async -> Void)

A closure that accepts an optional Any? argument, representing the data to be passed when the event is handled.

public func handleWith(
cb: (@escaping @Sendable @MainActor (Any?) async -> Void)
)

getChannel()

Returns the event channel as a string. This implementation retrieves the dynamic string from Event base class in cpp

public func getChannel() -> String

Returns

String · A String representing the event channel.

We use cookies on our website. We use them to ensure the proper functioning of the site and, if you agree, for purposes we set, such as analytics or marketing.

PrivMX Endpoint Swift v2.3

This package is not up to date with the core documentation. Some of the features you've seen described in other parts of the documentation might not be mentioned here. Those changes do not influence compatibility, however