CallWindow
@objc(BDKCallWindow)
public class CallWindow : UIWindow
extension CallWindow: CallViewControllerDelegate
extension CallWindow: MessageNotificationControllerDelegate
A Window with a BDKCallViewController
as his rootViewController.
-
The window unique instance shared between view controllers.
Declaration
Swift
@objc public private(set) static var instance: CallWindow?
-
The window’s delegate.
Declaration
Swift
@objc public weak var callDelegate: CallWindowDelegate?
-
The intent used to star the
BDKCallViewController
.Declaration
Swift
@objc public private(set) var intent: BDKIntent?
-
Initialize a window instance.
Warning
Init the window only one at a time, otherwise a fatal error is thrown.Declaration
Swift
@objc public convenience init()
-
Make the
BDKCallViewController
presentation only if is there is no already an ongoing call or if you try to start the same call that is already ongoing, otherwise will do nothing.Declaration
Swift
@objc public func shouldPresentCallViewController(intent: BDKIntent?, completion: @escaping ((Bool) -> Void))
Parameters
intent
The intent object to be handled by the receiver.
completion
The completion called at the end of the method job. Returns true if the presentation will start, otherwise returns false.
-
Will dismiss the
BDKCallViewController
instance without deallocating it.Declaration
Swift
@objc public func dismissCallViewController(completion: @escaping (() -> Void))
Parameters
completion
The completion called at the end of the dismiss.
-
Sets the call view controller configuration to be used.
Remark
The configuration argument provided is copied.Throws
throws an
NSInternalInconsistencyException
if this method is called after the view has been loaded.Declaration
Swift
@objc public func setConfiguration(_ configuration: CallViewControllerConfiguration?)
Parameters
configuration
The call view controller configuration to be used.
-
Handles a Siri INStartVideoCallIntent. This intent is going to be provided by the system when CallKit is enabled and the user taps on the video button in the system call UI. In order to handle the request from the user you must send the intent received to the window.
Declaration
Swift
@available(iOS, introduced: 10.0, deprecated: 13.0, message: "handle(startVideoCallIntent:﹚ is deprecated. Please use handle(startCallIntent:﹚ instead") @objc(handleINStartVideoCallIntent:) public func handle(startVideoCallIntent intent: INStartVideoCallIntent)
Parameters
intent
The INStartVideoCallIntent received in your AppDelegate.
-
Handles a Siri INStartCallIntent. This intent is going to be provided by the system when CallKit is enabled and the user taps on the video button in the system call UI. In order to handle the request from the user you must send the intent received to the window.
Declaration
Swift
@available(iOS 13.0, *) @objc(handleINStartCallIntent:) public func handle(startCallIntent intent: INStartCallIntent)
Parameters
intent
The INStartCallIntent received in your AppDelegate.