CallKitConfigurationBuilder
@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.
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 forSwift
code. If your application is written in Objective-c
, you should use the BDKCallKitConfigurationBuilder
instead.
-
Creates a new builder instance
Declaration
Swift
public convenience init()
-
Call this method when you want to disable CallKIt integration.
Declaration
Swift
public func disabled()
-
Call this method when you want to enable CallKIt integration.
Declaration
Swift
public func enabled()
-
Call this method when you want to enable CallKit integration customising the system call user interface using an inline build closure.
The closure will provide a
CallKitProviderConfigurationBuilder
you may use to customise the system call interface calling one of its methods.callkit.enabled { providerConfig in providerConfig.supportedHandles([.phoneNumber, .emailAddress]) .ringtoneSound("my ringtone.mp3") .icon(UIImage(named: "callkit.png")!) }
Declaration
Swift
public func enabled(_ build: (CallKitProviderConfigurationBuilder) throws -> Void) rethrows
Parameters
build
A non escaping closure you provide to customise the CallKit user interface using the builder provided as closure argument.
-
Call this method when you want to enable CallKit integration customising the system call user interface using a provided
CallKitProviderConfigurationBuilder
object.Declaration
Swift
public func enabled(_ builder: CallKitProviderConfigurationBuilder)
Parameters
builder
The
CallKitProviderConfigurationBuilder
object you want to use for customising the CallKit user interface.