Protocols

The following protocols are available globally.

  • A protocol describing functionality of the UnbluClient.

    See more

    Declaration

    Swift

    protocol UnbluClient : AnyObject
  • A protocol describing functionality of the UnbluVisitorClient. This inherits functionality from UnbluClient.

    See more

    Declaration

    Swift

    protocol UnbluVisitorClient : UnbluClient
  • A protocol describing functionality of the UnbluAgentClient. This inherits functionality from UnbluClient.

    See more

    Declaration

    Swift

    protocol UnbluAgentClient : UnbluClient
  • UnbluAgentClientDelegate From UnbluCoreSDK

    The delegate for the UnbluAgentClient

    Declaration

    Swift

    protocol UnbluAgentClientDelegate : UnbluClientDelegate
  • The delegate for Unblu. Callbacks are always called on the Main thread.

    See more

    Declaration

    Swift

    protocol UnbluClientDelegate : AnyObject
  • A protocol that defines the interface for an Unblu two-factor authentication (2FA) web view.

    See more

    Declaration

    Swift

    protocol UnbluTwoFactorAuthWebViewProtocol
  • The delegate for the UnbluVisitorClient

    See more

    Declaration

    Swift

    protocol UnbluVisitorClientDelegate : UnbluClientDelegate
  • Delegate which handles authentication challanges of the Unblu webView.

    See more

    Declaration

    Swift

    protocol AuthenticationChallengeDelegate
  • The delegate for the UnbluCallModule

    See more

    Declaration

    Swift

    protocol UnbluCallModuleDelegate : AnyObject
  • Describes the functionality available within the UnbluCallModule

    See more

    Declaration

    Swift

    protocol UnbluCallModuleApi : UnbluModule
  • CustomActionInvocationData From UnbluCoreSDK

    Base class for custom action invocations, defines required fields

    Declaration

    Swift

    protocol CustomActionInvocationData : Decodable, Encodable
  • An object representing an Unblu conversation

    See more

    Declaration

    Swift

    protocol UnbluConversation : AnyObject
  • A protocol that defines an object that can intercept certain conversation related events.

    See more

    Declaration

    Swift

    protocol UnbluConversationInterceptor
  • A protocol that defines an object that can intercept certain conversation related events. This protocol should be used when it is necessary to obtain additional information about the recipient.

    See more

    Declaration

    Swift

    protocol UnbluConversationInterceptorWithRecipient : UnbluConversationInterceptor
  • This interface is used by the WebRtc provider to update the call module.

    See more

    Declaration

    Swift

    protocol CallModuleDelegate
  • CallModuleLocalDelegate From UnbluCoreSDK

    This interface is used by the CoreSDK classes to update the call module.

    Declaration

    Swift

    protocol CallModuleLocalDelegate : CallModuleDelegate
  • This is a base interface to a native call provider that allows you to use them dynamically.

    See more

    Declaration

    Swift

    protocol BaseWebRtcProvider
  • OpenTokWebRtcProvider From UnbluCoreSDK

    Specific functions of the OpenTok implementation

    Declaration

    Swift

    protocol OpenTokWebRtcProvider : BaseWebRtcProvider
  • TestWebRtcProvider From UnbluCoreSDK

    Specific functions of the OpenTok implementation

    Declaration

    Swift

    protocol TestWebRtcProvider : BaseWebRtcProvider
  • Specific functions of the LiveKit implementation

    See more

    Declaration

    Swift

    protocol LiveKitWebRtcProvider : BaseWebRtcProvider
  • InternalUnbluModule From UnbluCoreSDK

    Base module for all modules to get some easier function calls

    Declaration

    Swift

    protocol InternalUnbluModule : AnyObject
  • A protocol that gives Unblu modules access to Conversation specific actions

    Declaration

    Swift

    protocol InternalUnbluConversationInteractableModule : AnyObject
  • A protocol used when evaluating external links within Unblu

    See more

    Declaration

    Swift

    protocol UnbluExternalLinkHandler : AnyObject
  • UnbluModule From UnbluCoreSDK

    A module which can be used in Unblu. This can be added via the UnbluClientConfiguration.register(module) function.

    Declaration

    Swift

    protocol UnbluModule : AnyObject
  • Interface to the iOS CallKit bridge.

    This protocol abstracts the interaction with Apple’s CallKit and PushKit frameworks, allowing the UnbluCallKitModule to be decoupled from UnbluCoreSDK via late binding. The provider can be supplied explicitly through UnbluNotificationApi.setCallKitProvider(_:) If no provider is supplied and the CallKit module is not linked, the no-op fallback NoCallKitModule is used instead.

    During UnbluNotificationApi initialization, the provider is queried through isEnabled() and isCallKitSupported():

    • If isEnabled() returns false, the SDK disables PushKit support (UnbluNotificationApi.pushKitEnabled = false) and exits the CallKit setup path early.
    • If isCallKitSupported() returns false, the SDK also disables PushKit support and skips PushKit registration and CallKit voice initialization for that session.
    • When PushKit support is disabled, the SDK stops advertising the nativeInboundCall capability to the core/web layer.
    • When PushKit registration is skipped, no PushKit token is obtained or emitted to the backend through registerPushKitNotificationToken(...).
    • In that state, inbound call UI can still be driven through the local notification / webview fallback path that is used when no PushKit token is available.

    Conforming types are responsible for:

    • Registering for VoIP push notifications via PushKit.
    • Creating and configuring a CXProvider to present the native call UI.
    • Reporting incoming, outgoing, and unsuccessful calls to CallKit.
    • Ending calls and updating the CallKit call state accordingly.
    • Forwarding PushKit and CallKit delegate callbacks back into UnbluNotificationApi.

    Expected implementation contract:

    • registerForPushKit() must create/configure a PKPushRegistry, set the provider instance as its delegate and request .voIP pushes.
    • The provider must forward PushKit callbacks to UnbluNotificationApi.instance: pushRegistry(token:), pushRegistryInvalidate(), and pushRegistry(payload:completion:).
    • The provider must forward CXProviderDelegate actions to UnbluNotificationApi.instance.provider(answerCallUUID:), UnbluNotificationApi.instance.provider(endCallUUID:), and UnbluNotificationApi.instance.providerDidReset().
    • For outgoing calls, the built-in implementation also fulfills CXStartCallAction and reports the call as connecting and connected immediately.
    • Setup methods such as newCXProvider(_:) should be safe to call repeatedly; call-reporting methods should use the provided UUID unchanged so later SDK callbacks refer to the same call.

    CallKit is not supported in China (see isCallKitSupported()). When CallKit is unavailable, the SDK falls back to local notifications for incoming calls.

    See more

    Declaration

    Swift

    protocol UnbluCallKitApi
  • Interface to use notifications with unblu. As Firebase Cloud Messaging (FCM) SDK is build as a static library, we can not include it here. Most functions of this api should be called for specific notification callbacks typically fired in the AppDelegate.

    Unblu will display/handle notifications as shown in the following table. Api helper to check mainly if notifications are from unblu or not

    Unblu will display/handle notifications as shown in the following table.

    | App state | New Message | Incoming Call |

    | background | show notification | show notification |

    | foreground unblu UI closed | show notification | Trigger UnbluUiEventApi.UiVisibilityRequest |

    | foreground unblu UI open | Does nothing | Does nothing |

    Whenever a notification is clicked, the event UnbluUiEventApi.UiVisibilityRequest is triggered.

    See more

    Declaration

    Swift

    protocol UnbluNotificationApiProtocol : AnyObject
  • Defines an object that can intercept and interact with Unblu related notifications

    See more

    Declaration

    Swift

    protocol UnbluNotificationInterceptor
  • This protocol is used to notify when a request has been made to download a file.

    See more

    Declaration

    Swift

    protocol UnbluFileDownloadHandler
  • This protocol is used to notify when a request has been made to download a file with the authorization header in the http request

    See more

    Declaration

    Swift

    protocol UnbluFileDownloadHandlerWithAuthorizationToken : UnbluFileDownloadHandler
  • protocol which can be implemented to store the preferences of Unblu at a custom location.

    This is useful if encryption should used. Otherwise a default implementation can be used by creating a UserDefaultsPreferencesStorage.

    IMPORTANT: if you change the custom storage, please be aware that you are somehow capable of migrating the old data to the new storage.

    See more

    Declaration

    Swift

    protocol UnbluPreferencesStorage
  • Defines a creator to create a custom loading UI when the unblu UI is displayed. Using it at UnbluCoreApi#customLoadingViewCreator.

    See more

    Declaration

    Swift

    protocol UnbluCustomLoadingViewCreator
  • A protocol that defines additional behaviour available on the UnbluView, which itself will always be a UIView.

    See more

    Declaration

    Swift

    protocol UnbluView : UIView
  • This is the api for the mobile co-browsing module. This is only usable if the corresponding module got registered in the used configuration.

    See more

    Declaration

    Swift

    protocol UnbluMobileCoBrowsingModuleApi : UnbluModule
  • The delegate for the UnbluMobileCoBrowsingModule

    See more

    Declaration

    Swift

    protocol UnbluMobileCoBrowsingModuleDelegate : AnyObject
  • The delegate for notification events received from Firebase.

    See more

    Declaration

    Swift

    @objc
    protocol UnbluFirebaseNotificationCoordinatorDelegate