CallViewControllerConfigurationBuilder
@available(iOS 12.0, *)
public class CallViewControllerConfigurationBuilder
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 bySwift code. If your app is written in Objective-c please use the BDKCallViewControllerConfigurationBuilder instead.
-
Call this method when you want to specify the formatter used to format the callees or caller information in the call UI.
Declaration
Swift
@available(*, deprecated, message: "Use withFormatter(_:﹚ instead") public func withCallInfoTitleFormatter(_ formatter: Formatter) -> CallViewControllerConfigurationBuilderParameters
formatterThe formatter to be used.
Return Value
self after storing the formatter.
-
Call this method when you want to specify the formatter used to format the callees or caller information in the call UI.
Since
3.5.0Declaration
Swift
public func withFormatter(_ formatter: Formatter) -> CallViewControllerConfigurationBuilderParameters
formatterThe formatter to be used.
Return Value
self after storing the formatter.
-
Call this method when you want to specify the URL for the mp4 video simulating a camera while running in the iOS Simulator.
iOS Simulators lack support for camera, when testing on a simulator you can provide a fake video that will be sent to the call participants as of a camera stream.
Declaration
Swift
public func withFakeCapturerFileURL(_ url: URL) -> CallViewControllerConfigurationBuilderParameters
urlThe url of the mp4 file used when running the application in the simulator
Return Value
self after storing the mp4 file url
-
Call this method when you want to specify the theme instance that is going to be used by
CallViewControllerwhen presenting the Call UI.Declaration
Swift
public func withCallTheme(_ theme: Theme) -> CallViewControllerConfigurationBuilderParameters
themeThe
Themeinstance used to customise the Call UI.Return Value
self after storing the theme instance.
-
Call this method when you want to specify the theme instance that is going to be used when presenting the file sharing UI.
Declaration
Swift
public func withFileSharingTheme(_ theme: Theme) -> CallViewControllerConfigurationBuilderParameters
themeThe
Themeinstance used to customise the file sharing UI.Return Value
self after storing the theme instance.
-
Call this method when you want to specify the theme instance that is going to be used when presenting the whiteboard UI.
Declaration
Swift
public func withWhiteboardTheme(_ theme: Theme) -> CallViewControllerConfigurationBuilderParameters
themeThe
Themeinstance used to customise the whiteboard UI.Return Value
self after storing the theme instance.
-
Call this method when you want to specify the theme instance that is going to be used when presenting the whiteboard text editor UI.
Declaration
Swift
public func withWhiteboardTextEditorTheme(_ theme: Theme) -> CallViewControllerConfigurationBuilderParameters
themeThe
Themeinstance used to customise the whiteboard text editor UI.Return Value
self after storing the theme instance.
-
Call this method when you want to enable the call feedback UI at the end of the call.
Enables a flag determining whether, at the end of the call, the user should be asked to leave a feedback for the call performed, specifying the
Themeinstance that is going to be used by the feedback UI and the delay in seconds after which the feedback popup is automatically dismissed when the user leaves a feedback.Declaration
Swift
public func withFeedbackEnabled(theme: Theme = .default(), autoDismissDelay: TimeInterval = 3) -> CallViewControllerConfigurationBuilderParameters
themeThe
Themeinstance used to customise the feedback popup. The default value for this parameter isTheme.default()autoDismissDelayThe interval in seconds after which the feedback is automatically dismissed without the user intervention. The default value for this parameter is 3 seconds
Return Value
self after enabling the feedback UI.
-
Call this method when you want to override the
Bundleand the filename from which localisations strings are retrieved.Declaration
Swift
public func withCustomLocalizations(bundle: Bundle, tableName: String = "Localizable") -> CallViewControllerConfigurationBuilderParameters
bundleThe bundle containing the table’s strings file you want to use.
tableNameThe filename from which localisable strings should be retrieved from.
Return Value
self after storing the localisation
Bundleand table name. -
Call this method when you want to enable the ringing UI on an incoming call.
Calling this method will make the ringing UI visible on an incoming call. If CallKit is not enabled calling this method is unnecessary because the ringing UI will be showed anyway.
Declaration
Swift
public func withRingingUIEnabled() -> CallViewControllerConfigurationBuilderReturn Value
self after enabling ringing UI showing.
-
Call this method when you want to the
CallViewControllerto be presented inPicture in picturemode.Since
3.7.0Declaration
Swift
public func withPresentationModePiP() -> CallViewControllerConfigurationBuilderReturn Value
self after changing
CallViewControllerpresentation mode toCallViewControllerPresentationMode.pip -
Creates a new builder instance
Declaration
Swift
public init() -
Builds and returns an instance of a
CallViewControllerConfigurationclass.Declaration
Swift
public func build() -> CallViewControllerConfigurationReturn Value
a
CallViewControllerConfigurationinstance built using the configuration values provided.
View on GitHub
CallViewControllerConfigurationBuilder Class Reference