TwilioVoice Class Reference
Inherits from | NSObject |
---|---|
Declared in | TwilioVoice.h |
Overview
The TwilioVoice
is the entry point for interaction with the Twilio service.
CallKit Audio Session Handling
Other Methods
logLevel
Logging level of the SDK.
@property (nonatomic, assign) TVOLogLevel logLevel
Discussion
Logging level of the SDK.
See Also
Declared In
TwilioVoice.h
publishMetricsEnabled
Call quality metrics publishing. YES
to enable. NO
to disable.
@property (nonatomic, assign, getter=isPublishMetricsEnabled) BOOL publishMetricsEnabled
Discussion
Call quality metrics publishing. YES
to enable. NO
to disable.
Declared In
TwilioVoice.h
+ sharedInstance
Returns the shared instance of the TwilioVoice
.
+ (nonnull TwilioVoice *)sharedInstance
Return Value
The shared instance of the TwilioVoice
Discussion
Returns the shared instance of the TwilioVoice
.
Declared In
TwilioVoice.h
– version
Returns the version of the SDK.
- (nonnull NSString *)version
Return Value
The version of the SDK.
Discussion
Returns the version of the SDK.
Declared In
TwilioVoice.h
– setModule:logLevel:
Sets logging level for an individual module.
- (void)setModule:(TVOLogModule)module logLevel:(TVOLogLevel)level
Parameters
module |
The |
---|---|
level |
The |
Discussion
Sets logging level for an individual module.
See Also
Declared In
TwilioVoice.h
Managing VoIP Push Notifications
– registerWithAccessToken:deviceToken:completion:
Registers for Twilio VoIP push notifications.
- (void)registerWithAccessToken:(nonnull NSString *)accessToken deviceToken:(nonnull NSString *)deviceToken completion:(nullable void ( ^ ) ( NSError *__nullable error ))completion
Parameters
accessToken |
Twilio Access Token. |
---|---|
deviceToken |
The push registry token for Apple VoIP Service. |
completion |
Callback block to receive the result of the registration. |
Discussion
Registers for Twilio VoIP push notifications.
Declared In
TwilioVoice.h
– unregisterWithAccessToken:deviceToken:completion:
Unregisters from Twilio VoIP push notifications.
- (void)unregisterWithAccessToken:(nonnull NSString *)accessToken deviceToken:(nonnull NSString *)deviceToken completion:(nullable void ( ^ ) ( NSError *__nullable error ))completion
Parameters
accessToken |
Twilio Access Token. |
---|---|
deviceToken |
The push registry token for Apple VoIP Service. |
completion |
Callback block to receive the result of the unregistration. |
Discussion
Unregisters from Twilio VoIP push notifications.
Declared In
TwilioVoice.h
– handleNotification:delegate:
Processes the incoming VoIP push notification payload.
- (void)handleNotification:(nonnull NSDictionary *)payload delegate:(__nullable id<TVONotificationDelegate>)delegate
Parameters
payload |
Push notification payload. |
---|---|
delegate |
A |
Discussion
Processes the incoming VoIP push notification payload.
See Also
Declared In
TwilioVoice.h
Making Outgoing Calls
– call:params:delegate:
Makes an outgoing call.
- (nullable TVOCall *)call:(nonnull NSString *)accessToken params:(nullable NSDictionary<NSString*,NSString*> *)twiMLParams delegate:(nullable id<TVOCallDelegate>)delegate
Parameters
accessToken |
Twilio Access Token. |
---|---|
twiMLParams |
Additional parameters to be passed to the TwiML application. |
delegate |
A |
Return Value
A TVOCall
object.
Discussion
Makes an outgoing call.
See Also
Declared In
TwilioVoice.h
CallKitIntegration Methods
– configureAudioSession
The application needs to use this method to set up the AVAudioSession with desired configuration before letting the CallKit framework activate the audio session.
- (void)configureAudioSession
Discussion
The application needs to use this method to set up the AVAudioSession with desired configuration before letting the CallKit framework activate the audio session.
Declared In
TwilioVoice.h
– startAudioDevice
The application needs to use this method to signal the SDK to start audio I/O units when receiving the audio activation callback of CXProviderDelegate.
- (void)startAudioDevice
Discussion
The application needs to use this method to signal the SDK to start audio I/O units when receiving the audio activation callback of CXProviderDelegate.
Declared In
TwilioVoice.h
– stopAudioDevice
The application needs to use this method to signal the SDK to stop audio I/O units when receiving the deactivation or reset callbacks of CXProviderDelegate.
- (void)stopAudioDevice
Discussion
The application needs to use this method to signal the SDK to stop audio I/O units when receiving the deactivation or reset callbacks of CXProviderDelegate.
Declared In
TwilioVoice.h
– audioSessionDeactivated
The application needs to use this method to signal the SDK that the system has deactivated the audio session when receiving the deactivation callback of CXProviderDelegate.
- (void)audioSessionDeactivated
Discussion
The application needs to use this method to signal the SDK that the system has deactivated the audio session when receiving the deactivation callback of CXProviderDelegate.
Declared In
TwilioVoice.h