ToolsConfigurationBuilder

@available(iOS 12.0, *)
public class ToolsConfigurationBuilder

A builder that helps creating the configuration for the Kaleyra Video SDK collaborative tools.

This object helps you setting up the Kaleyra Video SDK tools guiding you in this process with a fluent interface. Let’s pretend you want to setup the SDK with the following tools:

  • Whiteboard: enabled with upload disabled
  • File share: enabled
  • Chat: enabled
  • In-app screen sharing: enabled
  • Broadcast screen sharing: disabled

 let builder = ToolsConfigurationBuilder()
                 .whiteboard(uploadEnabled: false)
                 .fileShare()
                 .chat()
                 .inAppScreensharing()

By default all tools are disabled, if you want to enable one or more tool you are required to do so by calling one of the method by this builder.

Remark

This builder is suited and available only for Swift code. If your application is written in Objective-c, you should use the BDKToolsConfigurationBuilder instead.
  • Creates a new builder instance

    Declaration

    Swift

    public init()

Whiteboard

  • Call this method when you want to enable the whiteboard tool.

    Declaration

    Swift

    @discardableResult
    public func whiteboard(uploadEnabled: Bool) -> ToolsConfigurationBuilder

    Parameters

    uploadEnabled

    A flag indicating whether the whiteboard upload tool is enabled or not

    Return Value

    self after enabling the whiteboard tool.

File share

  • Call this method when you want to enable the file share tool.

    Declaration

    Swift

    @discardableResult
    public func fileshare() -> ToolsConfigurationBuilder

    Return Value

    self after enabling the file share tool .

In-app screen sharing

  • Call this method when you want to enable the in-app screen sharing tool.

    Declaration

    Swift

    @discardableResult
    public func inAppScreenSharing() -> ToolsConfigurationBuilder

Broadcast screen sharing

  • Call this method when you want to enable the broadcast screen sharing tool.

    This method requires two parameters, the first one identifies the app group identifier used by the Kaleyra Video SDK bundled in your app and the Kaleyra Video Broadcast Extension SDK bundled in your broadcast upload extension. An app group identifier has the following format group., usually the app group identifier matches your app bundle id with the word group. prefixed to it. So for example if your app has com.acme.MyApp bundle id the app group identifier might be group.com.acme.MyApp. The second identifier, is the bundle identifier of your broadcast upload extension. When a correct value is provided, the Kaleyra Video SDK will present the user only your app, among those installed on the user device that provides a broadcast upload extension. However, if a wrong identifier is provided, the user will be presented with a list of all apps installed on her / his device providing a broadcast extension.

    Declaration

    Swift

    @discardableResult
    public func broadcastScreenSharing(appGroupIdentifier: String, broadcastExtensionBundleIdentifier: String) -> ToolsConfigurationBuilder

    Parameters

    appGroupIdentifier

    The application group identifier, needed by the SDK in order to share information with the broadcast extension.

    broadcastExtensionBundleIdentifier

    The bundle identifier of your broadcast upload extension.

    Return Value

    self after enabling the broadcast screen sharing tool.

Chat

  • Call this method when you want to enable the chat tool.

    Declaration

    Swift

    @discardableResult
    public func chat() -> ToolsConfigurationBuilder

    Return Value

    self after enabling the chat tool.