CallWindow
@available(iOS 12.0, *)
@objc(BDKCallWindow)
public class CallWindow : UIWindow
extension CallWindow: CallViewControllerDelegate
A UIWindow
subclass having a CallViewController
instance as its rootViewController.
-
The window unique instance.
Declaration
Swift
@objc public private(set) weak static var instance: CallWindow? { get }
-
The window’s delegate.
Declaration
Swift
@objc public weak var callDelegate: CallWindowDelegate?
-
The intent used to start the
CallViewController
.Declaration
Swift
@objc public private(set) var intent: Intent? { get }
-
Initialize a
CallWindow
instance.Warning
Init the window only one at a time, otherwise a fatal error is thrown.Declaration
Swift
@objc public convenience init()
-
Initialize a
CallWindow
instance already associated with a given UIWindowScene instance,Warning
Init the window only one at a time, otherwise a fatal error is thrown.Declaration
Swift
@available(iOS 13.0, *) @objc public override init(windowScene: UIWindowScene)
Parameters
windowScene
The UIWindowScene instance.
-
Presents a
CallViewController
as its root view controller. If there is already another active call being handled an error will be raised and reported in the completion block provided as second argument.Declaration
Swift
@objc public func presentCallViewController(for intent: Intent, completion: ((Error?) -> Void)? = nil)
Parameters
intent
The intent object to be handled by the receiver.
completion
The completion called at the end of the method job. Returns no error if the presentation will start, otherwise returns an error.
-
Dismiss the
CallViewController
instance managed by this window animating the transition. TheCallViewController
instance managed by this window is retained by this window until the call theCallViewController
represents has ended.Declaration
Swift
@objc public func dismissCallViewController(completion: @escaping () -> Void)
Parameters
completion
The completion block called at the end of the dismiss animation.
-
Sets the call view controller configuration to be used by the
CallViewController
instance managed by this window.Remark
The configuration argument provided is copied.
Declaration
Swift
@objc public func setConfiguration(_ configuration: CallViewControllerConfiguration?)
Parameters
configuration
The call view controller configuration to be used by the
CallViewController
instance managed by this window.
-
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 on behalf of the user you must call this method with the INStartVideoCallIntent received in your AppDelegate.
Declaration
Swift
@available(iOS, introduced: 12.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 on behalf of the user you must call this method with the INStartCallIntent received in your AppDelegate.
Declaration
Swift
@available(iOS 13.0, *) @objc(handleINStartCallIntent:) public func handle(startCallIntent intent: INStartCallIntent)
Parameters
intent
The INStartCallIntent received in your AppDelegate.
-
Invoke this method when you want the call UI to transtion from
fullscreen
topicture in picture
. Calls to this function will be ignored when the UI is already inPIP
mode.Since
3.7.0Declaration
Swift
@objc(presentPictureInPictureAnimated:completion:) public func presentPictureInPicture(animated: Bool, completion: ((Error?) -> Void)? = nil)
Parameters
animated
A flag indicating if the transition should be animated or not.
completion
A callback signaling whether the transition succeed or not. May be nil.
-
Invoke this method when you want the call UI to transtion from
picture in picture
tofullscreen
. Calls to this function will be ignored when the UI is already infullscreen
mode.Since
3.7.0Declaration
Swift
@objc(hidePictureInPictureAnimated:completion:) public func hidePictureInPicture(animated: Bool, completion: ((Error?) -> Void)? = nil)
Parameters
animated
A flag indicating if the transition should be animated or not.
completion
A callback signaling whether the transition succeed or not. May be nil.
-
: nodoc:
Declaration
Swift
public func callViewController(_ controller: CallViewController, openChatWith participantId: String)
-
: nodoc:
Declaration
Swift
public func callViewControllerDidPressBack(_ controller: CallViewController)
-
: nodoc:
Declaration
Swift
public func callViewControllerDidFinish(_ controller: CallViewController)
-
: nodoc:
Declaration
Swift
public func callViewController(_ controller: CallViewController, willChangePresentationModeFrom oldValue: CallViewControllerPresentationMode, to newValue: CallViewControllerPresentationMode)
-
: nodoc:
Declaration
Swift
public func callViewController(_ controller: CallViewController, didChangePresentationModeFrom oldValue: CallViewControllerPresentationMode, to newValue: CallViewControllerPresentationMode)