Class

CXProvider

An object that represents a telephony provider.

Declaration

@interface CXProvider : NSObject

Overview

A CXProvider object is responsible for reporting out-of-band notifications that occur to the system. A VoIP app should create only one instance of CXProvider and store it for use globally. A CXProvider object is initialized with a CXProviderConfiguration object to specify the behavior and capabilities of calls. Each provider can specify an object conforming to the CXProviderDelegate protocol to respond to events, such as the call starting, the call being put on hold, or the provider’s audio session being activated.

Subclassing Notes

CXProvider is not intended for subclassing.

Topics

Creating New Providers

- initWithConfiguration:

Initializes a new provider with the specified configuration.

Setting the Delegate

- setDelegate:queue:

Sets a provider delegate, specifying an optional queue on which to execute delegate methods.

Accessing Provider Attributes

configuration

The configuration of the provider.

Accessing Pending Transaction and Call Actions

pendingTransactions

Returns all transactions that are not yet completed.

- pendingCallActionsOfClass:withCallUUID:

Returns all call actions in any pending transactions of the specified class for the specified call identifier that are not yet completed.

Reporting Calls

- reportNewIncomingCallWithUUID:update:completion:

Reports a new incoming call with the specified unique identifier to the provider.

- reportOutgoingCallWithUUID:startedConnectingAtDate:

Reports to the provider that an outgoing call with the specified unique identifier started connecting at a particular time.

- reportOutgoingCallWithUUID:connectedAtDate:

Reports to the provider that an outgoing call with the specified unique identifier finished connecting at a particular time.

- reportCallWithUUID:updated:

Reports to the provider that an active call updated its information.

- reportCallWithUUID:endedAtDate:reason:

Reports to the provider that a call with the specified identifier ended at a given date for a particular reason.

Invalidating a Provider

- invalidate

Invalidates the provider and completes all active calls with an error.

Constants

CXCallEndedReason

Reasons for a call to end, as reported by the reportCallWithUUID:endedAtDate:reason: method.

CXErrorCode

Error codes for the CallKit Constants error domain.

CXErrorCodeIncomingCallError

Error codes for the CallKit Constants error domain.

CXErrorDomain

Domain for CallKit errrors. See CallKit Constants for possible error codes.

CXErrorDomainIncomingCall

Domain for errors during incoming calls. See CallKit Constants for possible error codes.

Relationships

Inherits From

See Also

Essentials

CXProviderDelegate

A collection of methods that are called by a telephony provider object.

CXProviderConfiguration

An encapsulation of the configuration of a provider object.