Classes

The following classes are available globally.

  • The authentication challenge handler provided by Unblu allows you to provide certificate Data and public keys to be used in certificate pinning. You can provide as many certificates as you want. If using this class, you should initialize using UnbluAuthenticationChallengeCertificate or a dictionary containing UnbluAuthenticationChallengePolicy objects.

    Example of initialization using UnbluAuthenticationChallengeCertificate:

    do {
        let certificate = try UnbluAuthenticationChallengeCertificate(name: "certificate", extension: "cer")
        let challengeHandler = UnbluAuthenticationChallengeHandler(data: [certificate])
    } catch {
    
    }
    

    Example of initialization using UnbluAuthenticationChallengePolicy:

    do {
        let certificate = try UnbluAuthenticationChallengeCertificate(name: "certificate", extension: "cer")
        let policies = [
            "example.com": UnbluAuthenticationChallengePolicy(certificates: [certificate])
        ]
        let challengeHandler = UnbluAuthenticationChallengeHandler(policies: policies)
    } catch {
    
    }
    
    See more

    Declaration

    Swift

    class UnbluAuthenticationChallengeHandler
  • The API to use to access unblu suite functionality like showing, opening conversations

    Before calling any other function #configureApi should be called inside the AppDelegate.

    Use the constants of UnbluEventApi to register for events and access their user info data

    A typical flow for the usage would be:

    AppDelegate#application() {
       UnbluCoreApi.instance.configureApi(UnbluClientConfiguration(unbluBaseUrl: "<base-url>", apiKey: "<apiKey>"))
    
       //register for general errors and/or also other events
       NotificationCenter.default.addObserver(self, selector: #selector(AppDelegate.handleErrorEvent(notification:)), name: Notification.Name.UnbluError, object: nil)
    
       //start the api. This could also be done later when it is needed, but it will take a while until the api is ready
       UnbluCoreApi.instance.initApi(success: {<success handling>}, failure: {<error handling>})
    }
    
    SomeViewController#showConversations() {
       //the conversations should be shown
       UnbluCoreApi.instance.showUi(visible: true)
    }
    
    See more

    Declaration

    Swift

    @objc
    class UnbluCoreApi
  • ResourceHelper From UnbluCoreSDK

    Helper to get the resource bundle for this framework

    Declaration

    Swift

    class ResourceHelper
  • Utility class that provides some useful operations commonly used across the UnbluCoreSDK and it’s external modules

    See more

    Declaration

    Swift

    class Utils
  • Provides a default basic implementation of the UnbluExternalLinkHandler. Use this class when assigning an external link handler to the UnbluClientConfiguration.

    See more

    Declaration

    Swift

    class UnbluDefaultExternalLinkHandler
  • Information about a conversation

    See more

    Declaration

    Swift

    class ConversationInfo
  • Information about a person

    See more

    Declaration

    Swift

    class PersonActivityInfo
  • Information about a person

    See more

    Declaration

    Swift

    class PersonInfo
  • This class decrypts the notification using AES 256 into a dictionary.

    See more

    Declaration

    Swift

    class UnbluEncryptedNotificationServiceHelper
  • 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

    class UnbluNotificationApi
  • A notification center delegate which checks if a notification is from unblu or not. it will then decide to display it or not, while the app is open. This handler is always set at startapp to the current notification center. If you want to use your own implementation of UNUserNotificationCenterDelegate, you can instanciate a new instance of this class and provide a delegate to it. Then assign it to the current UNNotificationCenter. This class will then forward all requests (except for the unblu notifications) to your implementation.

    See more

    Declaration

    Swift

    class UnbluNotificationCenterDelegate
    • The default file downloader provided by Unblu. Use this when configuring the UnbluCoreSDK unless you want to provide your own file downloader. In that case, provide a file conforming to the UnbluFileDownloader protocol.
    See more

    Declaration

    Swift

    class UnbluDefaultFileDownloadHandler
  • When this class is passed to the CoreSDK at configuration, Unblu will store certain preferences securely in the Keychain.

    See more

    Declaration

    Swift

    class UnbluKeychainPreferencesStorage
  • This class handles file downloads in the Unblu SDK and immediately previews the downloaded file instead of saving it to disk.

    See more

    Declaration

    Swift

    class UnbluPreviewFileDownloadHandler
  • Default implementation to store SDK preferences.

    Uses the UserDefaults.standard of the app.

    The values are not encrypted.

    See more

    Declaration

    Swift

    class UserDefaultsPreferencesStorage
  • A class representing configuration properties for the hidden Unblu UIWindow. Unblu uses a hidden UIWindow to make sure the connection with Unblu remains active in the background when the Unblu UI is closed.

    See more

    Declaration

    Swift

    class UnbluHiddenUIWindowConfiguration
  • Entry point to use the mobile co-browsing functionality of Unblu to share the screen of the app. This module has to be registered via UnbluClientConfiguration.register(module: ...). To use the api of the UnbluMobileCoBrowsingModule in the application, use UnbluMobileCoBrowsingModuleProvider.create(...).

    See more

    Declaration

    Swift

    class UnbluMobileCoBrowsingModuleProvider
  • An object that represents an area of the screen that will be obscured during a mobile co-browsing session

    See more

    Declaration

    Swift

    class UnbluMobileCoBrowsingPrivateArea
  • See more

    Declaration

    Swift

    class UnbluFirebaseNotificationCoordinator
  • Basic implementation of UIApplicationDelegate which overrides some application notification api callbacks for easy Firebase integration. Always call the super implementation of the delegate first, before handling the functions by your own.

    See more

    Declaration

    Swift

    @MainActor
    class UnbluFirebaseUIApplicationDelegate
  • UnbluDocumentCoBrowsingModuleProvider From UnbluDocumentCoBrowsingModule

    Entry point to use the document co-browsing functionality of Unblu to collaborate on documents with other users. The module has to be registered using UnbluClientConfiguration.register(module: ...). To use the API of the UnbluDocumentCoBrowsingModule in the application, use UnbluDocumentCoBrowsingModuleProvider.create(...).

    Declaration

    Swift

    class UnbluDocumentCoBrowsingModuleProvider