TranscriptPublisher

public class TranscriptPublisher<T>

Custom publisher for iOS 12.0 compatibility (replaces Combine’s Publisher)

  • Send a new value to all subscribers

    Declaration

    Swift

    public func send(_ value: T)

    Parameters

    value

    The value to send

  • Subscribe to publisher updates

    Declaration

    Swift

    public func subscribe(_ handler: @escaping (T) -> Void) -> TranscriptCancellable

    Parameters

    handler

    Closure to handle updates

    Return Value

    Cancellable token

  • Remove all subscribers

    Declaration

    Swift

    public func removeAllSubscribers()