Classes

The following classes are available globally.

  • A value object representing the options used when creating a call.

    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKCallOptions)
    public class CallOptions : NSObject
  • A view controller showing the user interface of the chat between the current user and the user specified in the OpenChatIntent provided. This view controller should be presented modally. You should not embed this view controller in a UINavigationController

    Remark

    You must provide an intent before the view controller’s view is loaded. Any intent provided after the view has loaded will be ignored.
    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKChannelViewController)
    public class ChannelViewController : UIViewController
  • A class holding the customization available for a ChannelViewController instance.

    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKChannelViewControllerConfiguration)
    public class ChannelViewControllerConfiguration : NSObject
  • A builder that helps creating the CallKit configuration used by the Kaleyra Video SDK.

    This object helps you setting up the Kaleyra Video SDK CallKit integration guiding you in this process with a fluent interface. You can either enable or disable the CallKit integration using the methods provided by this builder.

     let builder = CallKitConfigurationBuilder()
                      .enabled { provider in
                          provider.supportedHandles([.phoneNumber, .emailAddress])
                                  .ringtoneSound("my ringtone.mp3")
                                  .icon(UIImage(named: "callkit.png")!)
                      }
    

    By default, CallKit integration is enabled.

    Remark

    This builder is suited and available only for Swift code. If your application is written in Objective-c, you should use the BDKCallKitConfigurationBuilder instead.
    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    public class CallKitConfigurationBuilder
  • A builder that helps creating the CallKit configuration used by the Kaleyra Video SDK.

    This object helps you setting up the Kaleyra Video SDK CallKit integration guiding you in this process with a fluent interface. You can either enable or disable the CallKit integration using the methods provided by this builder.

     BDKConfig *config = BDKConfigBuilder.create(@"My app id", BDKEnvironmentSandbox, BDKRegionIndia)
                         .callKit(^(BDKCallKitConfigurationBuilder * callkit) {
                                  callkit.enabledWithConfiguration(^(BDKCallKitProviderConfigurationBuilder * provider {
                                                                    provider.ringtoneSound(@"my ringtone.mp3")
                                                                            .iconImage([UIImage imageNamed:@"callkit-icon"])
                                                                            .supportedHandles(@[@(CXHandleTypePhoneNumber), @(CXHandleTypeEmailAddress)]);
                                 });
                         })
                         .build();
    

    By default, CallKit integration is enabled.

    Remark

    This builder is suited for Objective-c code. If your application is written in Swift, you should use the CallKitConfigurationBuilder instead.
    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKCallKitConfigurationBuilder)
    public class CallKitConfigurationBuilderObjcAdapter : NSObject
  • A builder that helps you customise the CallKit user interface.

    This object helps you customising the CallKit user interface guiding you in this process with a fluent interface. You use this object while configuring the Kaleyra Video SDK integration with CallKit.

     callkit.enabled { providerConfig in
                       providerConfig.supportedHandles([.phoneNumber, .emailAddress])
                                     .ringtoneSound("my ringtone.mp3")
                                     .icon(UIImage(named: "callkit.png")!)
     }
    

    Remark

    This builder is suited and available only for Swift code. If your application is written in Objective-c, you should use the BDKCallKitProviderConfigurationBuilder instead.
    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    public class CallKitProviderConfigurationBuilder
  • A builder that helps you customise the CallKit user interface.

    This object helps you customising the CallKit user interface guiding you in this process with a fluent interface. You use this object while configuring the Kaleyra Video SDK integration with CallKit.

     BDKConfig *config = BDKConfigBuilder.create(@"My app id", BDKEnvironmentSandbox, BDKRegionIndia)
                         .callKit(^(BDKCallKitConfigurationBuilder * callkit) {
                                  callkit.enabledWithConfiguration(^(BDKCallKitProviderConfigurationBuilder * provider {
                                                                    provider.ringtoneSound(@"my ringtone.mp3")
                                                                            .iconImage([UIImage imageNamed:@"callkit-icon"])
                                                                            .supportedHandles(@[@(CXHandleTypePhoneNumber), @(CXHandleTypeEmailAddress)]);
                                 });
                         })
                         .build();
    

    Remark

    This builder is suited for Objective-c code. If your application is written in Swift, you should use the CallKitProviderConfigurationBuilder instead.
    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKCallKitProviderConfigurationBuilder)
    public class CallKitProviderConfigurationBuilderObjcAdapter : NSObject
  • A value object holding the SDK CallKit integration configuration values.

    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKCallKitConfiguration)
    public class CallKitConfiguration : NSObject
  • And object containing the configuration for the camera, used during a video call by the Kaleyra Video SDK.

    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKCameraConfiguration)
    public class CameraConfiguration : NSObject
  • A builder that helps creating the camera configuration used by the Kaleyra Video SDK.

     let config = try ConfigBuilder(appID: "my app id", environment: .production, region: .europe)
                      .camera { camera in
                              camera.withCameraPosition(.back)
                      }.build()
    

    Remark

    This builder is suited and available only for Swift code. If your application is written in Objective-c, you should use the BDKCameraConfigurationBuilder instead.
    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    public class CameraConfigurationBuilder
  • A builder that helps creating the camera configuration used by the Kaleyra Video SDK.

      BDKConfig *config = BDKConfigBuilder.create(@"My app id", BDKEnvironmentSandbox, BDKRegionIndia)
                                          .camera(^(BDKCameraConfigurationBuilder * camera) {
                                                  camera.withCameraPosition(BDKCameraPositionBack);
                                          }).build();
    

    Remark

    This builder is suited for Objective-ccode. If your application is written in Swift, you should use the CameraConfigurationBuilder instead.
    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKCameraConfigurationBuilder)
    public class CameraConfigurationBuilderObjcAdapter : NSObject
  • A class encapsulating the configuration options for the Kaleyra Video SDK.

    You are required to configure the Kaleyra Video SDK providing it a Config object before the SDK can be used. You create this object using the ConfigBuilder object.

    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKConfig)
    public class Config : NSObject
  • A builder that constructs Kaleyra Video SDK Config objects.

    This object helps you creating Config objects guiding you in this process with a fluent interface. The only required parameters are the appID, the environment and the region values. You must provide those values in the builder initialiser, then you can use the builder methods to enable or disable tools and other SDK features.

      try ConfigBuilder(appID: "my app id", environment: .production, region: .europe)
            .callKit { callkit in
                       callkit.enabled { providerBuilder in
                                          providerBuilder.supportedHandles([.generic])
                                                         .ringtoneSound("ringtone.mp3")
                                                         .icon(UIImage(named: "callkit-icon")!)
                       }
            }
            .voip { voip in
                    voip.automatic(pushRegistryDelegate: self)
            }
            .tools { tools in
                     tools.chat()
                          .whiteboard(uploadEnabled: true)
                          .fileshare()
                          .inAppScreenSharing()
                          .broadcastScreenSharing(appGroupIdentifier: "group.com.acme.Acme",
                                                  broadcastExtensionBundleIdentifier: "com.acme.Acme.BroadcastExtension")
            }
            .disableDirectIncomingCalls()
            .hijackAudioRoute(.always)
            .build()
    

    By default the builder will use some default values if you don’t override them by calling one of its methods. Here’s a list of the default values:

    • CallKit is enabled
    • VoIP notifications are NOT handled automatically, you must handle them yourself
    • All tools are disabled
    • Camera configuration has cameraPosition set to front
    • The SDK will listen for direct incoming calls coming from the WebSocket connection
    • TheSpeakerHijackingStrategy is SpeakerHijackingStrategy.videoForeground.

      Remark

      This builder is suited and available only for Swift code. If your application is written in Objective-c, you should use the BDKConfigBuilder instead.
    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    public class ConfigBuilder
  • A builder that constructs Kaleyra Video SDK Config objects.

    This object helps you creating Config objects guiding you in this process with a fluent interface. The only required parameters are the appID, the environment and the region values. You must provide those values in the builder create factory block, then you can use the builder methods to enable or disable tools and other SDK features.

     BDKConfig *config = BDKConfigBuilder.create(@"My app id", BDKEnvironmentSandbox, BDKRegionIndia)
                                          .callKit(^(BDKCallKitConfigurationBuilder * callkit) {
                                                      callkit.enabled();
                                          })
                                          .voip(^(BDKVoIPPushConfigurationBuilder * voip){
                                                      voip.manual(@"foo.bar");
                                          })
                                          .tools(^(BDKToolsConfigurationBuilder *tools){
                                                      tools.chat()
                                                           .fileshare()
                                                           .inAppScreensharing()
                                                           .whiteboard();
                                          })
                                          .disableDirectIncomingCalls()
                                          .hijackAudioRoute(BDKSpeakerHijackingStrategyNever)
                                          .build();
    

    By default the builder will use some default values if you don’t override them by calling one of its methods. Here’s a list of the default values:

    • CallKit is enabled
    • VoIP notifications are NOT handled automatically, you must handle them yourself
    • All tools are disabled
    • Camera configuration has cameraPosition set to front
    • The SDK will listen for direct incoming calls coming from the WebSocket connection
    • TheSpeakerHijackingStrategy is SpeakerHijackingStrategy.videoForeground.

      Remark

      This builder is suited for Objective-ccode. If your application is written in Swift, you should use the ConfigBuilder instead.
    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKConfigBuilder)
    public class ConfigBuilderObjcAdapter : NSObject
  • A value object holding the configuration values for the broadcast screen sharing tool.

    You may enable or disable the broadcast screen sharing tool during SDK configuration. When enabling the broadcast screen sharing tool you are required to provide the app group identifier shared by your app and the your broadcast upload extension. The broadcastExtensionBundleIdentifier is the bundle identifier of your broadcast upload extension, that identifier is needed by the BandyerSDK when it is asked to present the RPSystemBroadcastPickerView. 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.

    Remark

    The broadcast screen sharing tool requires a broadcast upload extension bundled into your app. If an upload extension with the bundle id provided cannot be found the tool won’t work
    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKBroadcastScreensharingToolConfiguration)
    public class BroadcastScreensharingToolConfiguration : NSObject
  • A value object holding the configuration values for the chat tool.

    You may enable or disable the chat tool during SDK configuration.

    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKChatToolConfiguration)
    public class ChatToolConfiguration : NSObject
  • A value object holding the configuration values for the file share tool.

    You may enable or disable the file share tool during SDK configuration.

    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKFileshareToolConfiguration)
    public class FileshareToolConfiguration : NSObject
  • A value object holding the configuration values for the in-app screen share tool.

    You may enable or disable the in-app screen sharing tool during SDK configuration. When enabled, if the screen recorder is available, the user will be able to capture the app screen content and share it with the other participants in the call.

    Remark

    The screen recorder will record only the app main window’s content and it will be stopped when the app goes in background.
    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKInAppScreensharingToolConfiguration)
    public class InAppScreensharingToolConfiguration : NSObject
  • A value object holding Kaleyra Video SDK tools configuration

    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKToolsConfiguration)
    public class ToolsConfiguration : NSObject
  • 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.
    See more

    Declaration

    Swift

    @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
     BDKConfig *config = BDKConfigBuilder.create(@"My app id", BDKEnvironmentSandbox, BDKRegionIndia)
                                         .tools(^(BDKToolsConfigurationBuilder *tools){
                                                  tools.whiteboardWithUploadDisabled()
                                                       .fileshare()
                                                       .chat()
                                                       .inAppScreensharing()
                                         })
                                         .build()
    

    Remark

    This builder is suited for Objective-ccode. If your application is written in Swift, you should use the ToolsConfigurationBuilder instead.
    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKToolsConfigurationBuilder)
    public class ToolsConfigurationBuilderObjcAdapter : NSObject
  • A value object holding the configuration values for the whiteboard tool.

    The tool can be configured to provide an upload button in the user interface enabling users to upload photos or files in the whiteboard

    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKWhiteboardToolConfiguration)
    public class WhiteboardToolConfiguration : NSObject
  • A value object holding Kaleyra Video SDK VoIP notifications configuration.

    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKVoIPPushConfiguration)
    public class VoIPPushConfiguration : NSObject
  • A builder that helps creating the VoIP push notifications configuration used by the Kaleyra Video SDK.

     let config = try ConfigBuilder(appID: "my app id", environment: .production, region: .europe)
                      .voip { voip in
                              voip.automatic(pushRegistryDelegate: self)
                      }.build()
    

    This object helps you setting up the Kaleyra Video SDK VoIP notifications configuration guiding you in this process with a fluent interface. The Kaleyra Video SDK supports two VoIP notifications handling strategies: automatic meaning the SDK will handle the VoIP notifications without the app intervention and manual, meaning your app must handle incoming VoIP notifications and hand them to the SDK.

    Remark

    This builder is suited and available only for Swift code. If your application is written in Objective-c, you should use the BDKVoIPPushConfigurationBuilder instead.
    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    public class VoIPPushConfigurationBuilder
  • A builder that helps creating the VoIP push notifications configuration used by the Kaleyra Video SDK.

    This object helps you setting up the Kaleyra Video SDK VoIP notifications configuration guiding you in this process with a fluent interface. The Kaleyra Video SDK supports two VoIP notifications handling strategies: automatic meaning the SDK will handle the VoIP notifications without the app intervention and manual, meaning your app must handle incoming VoIP notifications and hand them to the SDK.

      BDKConfig *config = BDKConfigBuilder.create(@"My app id", BDKEnvironmentSandbox, BDKRegionIndia)
                                          .voip(^(BDKVoIPPushConfigurationBuilder * voip) {
                                                  voip.automatic(self, @"data");
                                          }).build();
    

    Remark

    This builder is suited and available only for Swift code. If your application is written in Objective-c, you should use the BDKVoIPPushConfigurationBuilder instead.
    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKVoIPPushConfigurationBuilder)
    public class VoIPPushConfigurationBuilderObjcAdapter : NSObject
  • The Bandyer SDK facade.

    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objcMembers
    public class BandyerSDK : NSObject
  • An opaque object representing a chat notification.

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKChatNotification)
    public class ChatNotification : NSObject
  • An opaque object representing a file share notification.

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKFileShareNotification)
    public class FileShareNotification : NSObject
  • Represents the intent of handling an incoming call.

    When the SDK detects an incoming call has been received, you should create an HandleIncomingCallIntent instance passing it the call object received and hand it to a CallViewController or to a CallWindow.

    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKHandleIncomingCallIntent)
    public class HandleIncomingCallIntent : NSObject, Intent
  • Represents the intent of starting a call from an URL.

    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKJoinURLIntent)
    public class JoinURLIntent : NSObject, Intent
  • Represents the intent of starting a chat.

    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKOpenChatIntent)
    public class OpenChatIntent : NSObject, Intent
  • Represents the intent of navigating to the Kaleyra Video downloads screen.

    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKOpenDownloadsIntent)
    public class OpenDownloadsIntent : NSObject, Intent
  • Represents the request of making an outgoing call.

    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKStartOutgoingCallIntent)
    public class StartOutgoingCallIntent : NSObject, Intent
  • An object representing the session of user in the Kaleyra Video SDK.

    You create a Session object when you want the Kaleyra Video SDK to connect to the Kaleyra Video platform. You are required to provide the userId of the user you want to connect to Kaleyra Video and a component conforming to the AccessTokenProvider protocol the SDK will use when it needs an access token for the user. If you want to be informed of Session state changes you can provide an object conforming to the SessionObserver protocol in the object initialiser.

    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKSession)
    public class Session : NSObject
  • A view controller showing the user interface for the intent provided. You should present this view controller modally.

    Remark

    You must provide an intent before the view controller’s view is loaded.
    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKCallViewController)
    public class CallViewController : UIViewController
  • A class holding the UI customization for a CallViewController instance.

    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKCallViewControllerConfiguration)
    public class CallViewControllerConfiguration : NSObject
  • A builder that constructs CallViewControllerConfiguration objects.

     let theme = Theme()
     theme.accentColor = .systemBlue
    
     let config = CallViewControllerConfigurationBuilder()
                     .withFormatter(MyFormatter())
                     .withCallTheme(theme)
                     .withWhiteboardTheme(theme)
                     .withWhiteboardTextEditorTheme(theme)
                     .withFileSharingTheme(theme)
                     .withFeedbackEnabled(theme: theme, autoDismissDelay: 5)
                     .withCustomLocalizations(bundle: .myBundle, tableName: "CallUI")
                     .build()
    

    This object helps you creating CallViewControllerConfiguration objects guiding you in this process with a fluent interface. This object’s methods can be chained together “building” the configuration object in a declarative way.

    Remark

    This class is meant to be used by Swift code. If your app is written in Objective-c please use the BDKCallViewControllerConfigurationBuilder instead.
    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    public class CallViewControllerConfigurationBuilder
  • A builder that constructs CallViewControllerConfiguration objects.

     BDKTheme * theme = ...;
     NSBundle *bundle = ...;
    
     BDKCallViewControllerConfiguration *config = BDKCallViewControllerConfigurationBuilder
                                                                                  .create()
                                                                                  .withCallTheme(theme)
                                                                                  .withFileSharingTheme(theme)
                                                                                  .withWhiteboardTheme(theme)
                                                                                  .withWhiteboardTextEditorTheme(theme)
                                                                                  .withFeedbackEnabledUsingThemeAndAutoDismissDelay(theme, 5)
                                                                                  .withCustomLocalizationsUsingBundleAndTableName(bundle, @"CallUI")
                                                                                  .build();
    

    Remark

    This class is meant to be used by Objective-c code. If your app is written in Swift please use the CallViewControllerConfigurationBuilder instead.
    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKCallViewControllerConfigurationBuilder)
    public class CallViewControllerConfigurationBuilderObjcAdapter : NSObject
  • A UIWindow subclass having a CallViewControllerinstance as its rootViewController.

    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKCallWindow)
    public class CallWindow : UIWindow
    extension CallWindow: CallViewControllerDelegate
  • A class used to style the Kaleyra Video view controllers. Please see the provided documentation for knowledge about mapping between properties and UI components.

    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKTheme)
    public class Theme : NSObject, NSCopying
  • A class holding user profile information.

    See more

    Declaration

    Swift

    @available(iOS 12.0, *)
    @objc(BDKUserDetails)
    public class UserDetails : NSObject