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 logLevelDiscussion
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 publishMetricsEnabledDiscussion
Call quality metrics publishing. YES to enable. NO to disable.
Declared In
TwilioVoice.h
+ sharedInstance
Returns the shared instance of the TwilioVoice.
+ (nonnull TwilioVoice *)sharedInstanceReturn 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 *)versionReturn 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)levelParameters
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 ))completionParameters
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 ))completionParameters
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>)delegateParameters
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>)delegateParameters
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)configureAudioSessionDiscussion
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)startAudioDeviceDiscussion
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)stopAudioDeviceDiscussion
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