VoIPPushConfigurationBuilderObjcAdapter

@available(iOS 12.0, *)
@objc(BDKVoIPPushConfigurationBuilder)
public class VoIPPushConfigurationBuilderObjcAdapter : NSObject

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.
  • Call this property when you want to handle VoIP notifications yourself.

    Important

    When you receive a VoIP notification and you want the SDK to handle the push notification payload, you must call the BandyerSDK.handleNotification(_:) method

    The block expects a string as parameter that represents the keypath the SDK will search for the Kaleyra Video notification payload in the push notification received from APNS. If you provide a value the SDK will use that value as a key path to search for the call information in the VoIP notification, otherwise if you specify nil, the SDK will try to search for the call information in the VoIP notification by itself

    Declaration

    Swift

    @objc
    public var manual: (String?) -> Void { get }
  • Call this property when you want the Kaleyra Video SDK to handle VoIP notifications automatically when the application is in background.

    The block expects two parameters. The first one: An object conforming to the PKPushRegistryDelegate protocol that will be notified when the VoIP push token has been updated. The second one: The key path the SDK will search for the Kaleyra Video notification payload in the push notification received from APNS. If you provide a value the SDK will use that value as a key path to search for the call information in the VoIP notification, otherwise if you specify nil, the SDK will try to search for the call information in the VoIP notification by itself

    Declaration

    Swift

    @objc
    public var automaticBackground: (PKPushRegistryDelegate, String?) -> Void { get }
  • Call this property when you want the Kaleyra Video SDK to handle VoIP notifications automatically when the application is in background and when is in foreground.

    The block expects two parameters. The first one: An object conforming to the PKPushRegistryDelegate protocol that will be notified when the VoIP push token has been updated. The second one: The key path the SDK will search for the Kaleyra Video notification payload in the push notification received from APNS. If you provide a value the SDK will use that value as a key path to search for the call information in the VoIP notification, otherwise if you specify nil, the SDK will try to search for the call information in the VoIP notification by itself

    Declaration

    Swift

    @objc
    public var automaticBackgroundAndForeground: (PKPushRegistryDelegate, String?) -> Void { get }