Boostlingo

public final class Boostlingo : NSObject, Sendable

Boostlingo is the entry point to the Boostlingo SDK.

Used for accessing the Boostlingo API as well as initiating Calls. This can then be used for placing calls in the Boostlingo platform.

Properties

  • An asynchronous sequence of call events. This is a replacement of the BLCallDelegate.

    Declaration

    Swift

    public var callEventStream: AsyncStream<BLCallFlowEvent> { get }
  • An asynchronous sequence of chat events. This is a replacement of the BLChatDelegate.

    Declaration

    Swift

    public var chatEventStream: AsyncStream<BLChatFlowEvent> { get }
  • currentCall Asynchronous

    Current BLCall.

    Declaration

    Swift

    public var currentCall: BLCall? { get async }

Initialization

  • Obtains an instance of the Boostlingo SDK.

    Declaration

    Swift

    public init(
        authToken: String,
        region: String,
        logger: BLLogger = BLNullLogger()
    )

    Parameters

    authToken

    Boostlingo auth token retrieved from the server.

    region

    Boostlingo region from getRegions() list.

    logger

    logger implementation, BLNullLogger implementation is used by default .

Methods

  • Gets Boostlingo region list.

    Declaration

    Swift

    public static func getRegions() -> [String]
  • Gets Boostlingo library version.

    Declaration

    Swift

    public static func getVersion() -> String
  • initialize() Asynchronous

    Completes the asynchronous setup required after initialization.

    This method must be called after creating an instance to ensure all internal services are fully configured and ready to use.

    Important

    Failing to call this method may result in unexpected behavior.

    Declaration

    Swift

    public func initialize() async throws
  • dispose() Asynchronous

    Releases all resources used by the SDK and performs necessary cleanup.

    Call this method when you are finished using the SDK to ensure that all internal resources, such as network connections, memory, and background tasks, are properly released. After calling dispose(), the SDK instance should not be used again.

    Important

    Failing to call this method may result in resource leaks or unexpected behavior.

    Declaration

    Swift

    public func dispose() async
  • getCallDictionaries() Asynchronous

    Retrieves the call dictionaries from the Boostlingo API. Should be used for setting up language and service type lists, caches the results so API is not hit every time.

    Declaration

    Swift

    public func getCallDictionaries() async throws -> CallDictionaries?
  • getProfile() Asynchronous

    Retrieves the profile data from the Boostlingo API, caches the results so API is not hit every time.

    Declaration

    Swift

    public func getProfile() async throws -> Profile?
  • getVoiceLanguages() Asynchronous

    Retrieves an ordered list of languages enabled in the voice (OPI) policy. Helper for filtering and sorting the full list of languages. Uses the cached call dictionary.

    Declaration

    Swift

    public func getVoiceLanguages() async throws -> [Language]?
  • getVideoLanguages() Asynchronous

    Retrieves an ordered list of languages enabled in the video (VRI) policy. Helper for filtering and sorting the full list of languages. Uses the cached call dictionary.

    Declaration

    Swift

    public func getVideoLanguages() async throws -> [Language]?
  • Retrieves the call details from the Boostlingo API.

    Declaration

    Swift

    public func getCallDetails(callId: Int) async throws -> CallDetails?

    Parameters

    callId

    Call id.

  • getPreCallCustomForm() Asynchronous

    Retrieves the pre-call custom form data.

    Declaration

    Swift

    public func getPreCallCustomForm() async throws -> CustomForm?
  • Used to make/place a Video Call in Boostlingo.

    Declaration

    Swift

    public func makeVideoCall(
        callRequest: CallRequest,
        localVideoView: VideoView?
    ) async throws -> BLVideoCall?

    Parameters

    callRequest

    Call request model.

    localVideoView

    Local Video container.

  • Used to make/place a Call in Boostlingo.

    Declaration

    Swift

    public func makeVoiceCall(
        callRequest: CallRequest
    ) async throws -> BLVoiceCall?

    Parameters

    callRequest

    Call request model.

  • hangUp() Asynchronous

    Used to hang up the current call in Boostlingo.

    Declaration

    Swift

    public func hangUp() async throws
  • Toggles audio route for the current call.

    Declaration

    Swift

    public func toggleAudioRoute(toSpeaker: Bool)

    Parameters

    toSpeaker

    Overrides audio session output to speaker, if true.

  • Validates the call request is appropriate to start a call. Can be called directly, but it is always called when making video/voice calls.

    Declaration

    Swift

    public func validateCallReq(callReq: CallRequest) async throws

    Parameters

    callReq

    Call request model.

  • sendChatMessage(text:) Asynchronous

    Sends the text specified as a chat message to interpreter.

    Declaration

    Swift

    public func sendChatMessage(text: String) async throws -> ChatMessage?