Skip to contentSkip to navigationSkip to topbar
On this page

Voice iOS SDK Changelog


The Twilio Programmable Voice SDKs allow you to add voice-over-IP (VoIP) calling to your native iOS applications.

(information)

Info

(warning)

iOS 13 Compatibility Notice

Apps using SDK versions 2.0.x, 3.x, and 4.x may fail to register for incoming calls when running on iOS 13. We recommend that you upgrade to SDK 5.0 or above. Refer to this advisory(link takes you to an external page) and this GitHub issue(link takes you to an external page) for more information. Check out our migration guides(link takes you to an external page) when planning your move to our latest SDK.

(warning)

Warning

The Twilio Programmable Voice SDKs use Semantic Versioning(link takes you to an external page). Twilio supports version N-1 for 12 months after the first GA release of version N. We recommend you upgrade to the latest version as soon as possible to avoid any breaking changes. Version 6.x is the latest iOS version.

Support for 4.x ceased on September 19, 2020. Please upgrade to the latest version

Support for 3.x ceased on June 28, 2020. Please upgrade to the latest version

Support for 2.x ceased on January 1, 2020. Please upgrade to the latest version

End-of-Life for 1.x will occur on March 23, 2021. A two-hour maintenance period is planned for 1.x at 9am Pacific Time on January 26, 2021. Please upgrade to the latest version. See this EoL notice(link takes you to an external page) for further details.


6.12.1

6121 page anchor

December 3, 2024

  • Programmable Voice iOS SDK 6.12.1 [XCFramework](link takes you to an external page) (checksum: f74b41d69451461e4fe0a4bc48eeb6d2e469d0c13175e5abbee3a38926eb4acd).

Bug Fixes

  • Fixed a bug where callSid is missing from the dictionary returned by [TVOPreflightTest dictionaryReport].
  • Fixed a bug where the signaling library was throwing an exception while initiating a call with per-app based VPN enabled.
  • Fixed the TVOPreflightCallQuality enum Swift name alias typo.

Size Impact

ArchitectureCompressed SizeUncompressed Size
arm643.4 MB7.8 MB

October 21, 2024

API Changes

  • New methods [TwilioVoiceSDK runPreflightTestWithAccessToken:delegate:] and [TwilioVoiceSDK runPreflightTestWithOptions:delegate:] to run a preflight test are added.
  • A new class TVOPreflightOptions is added. Use [TVOPreflightOptions optionsWithAccessToken:] or the builder method [TVOPreflightOptions optionsWithAccessToken:block:] to create the options object as an argument when calling the [TwilioVoiceSDK runPreflightTestWithOptions:delegate:] method.
  • A new class TVOPreflightTest is added. This object cannot be initialized directly. Instead a TVOPreflightTest object is returned when calling the [TwilioVoiceSDK runPreflightTestWithAccessToken:delegate:] and [TwilioVoiceSDK runPreflightTestWithOptions:delegate:] methods. Please note that the stop() method can be used to disconnect the preflight test but will result in the [TVOPreflightDelegate preflight:didFailWithError:] callback with the TVOPreflightTestStatusFailed state of the preflight test.
  • A new protocol class TVOPreflightDelegate is added. Status updates of the preflight test will be raised via the delegate methods in this class.
  • A new class TVOPreflightReport is added. A comprehensive report object will be returned in the [TVOPreflightDelegate preflight:didCompleteWitReport:] callback. The report can also be retrived using the TVOPreflightTest.preflightReport property when the preflight test has completed.

An example of making a preflight test

1
class ViewController: UIViewController {
2
var preflightTest: PreflightTest? = nil
3
4
func performPreflight() {
5
let preflightOptions = PreflightOptions(accessToken: accessToken, block: { builder in
6
builder.preferredAudioCodecs = [OpusCodec()]
7
})
8
9
preflightTest = TwilioVoiceSDK.runPreflightTest(options: preflightOptions, delegate: self)
10
}
11
}
12
13
extension ViewController: PreflightDelegate {
14
func preflightDidComplete(preflightTest: PreflightTest, report: PreflightReport) {
15
// Check the result in the report
16
}
17
18
func preflightDidFail(preflightTest: PreflightTest, error: any Error) {
19
// Check the failure reason in the error
20
}
21
22
func preflightDidConnect(preflightTest: PreflightTest) {
23
// preflight test has connected
24
}
25
}

Bug Fixes

Size Impact

ArchitectureCompressed SizeUncompressed Size
arm643.4 MB7.8 MB

September 10, 2024

Enhancements

  • The SDK is now using reSIProcate 1.12.0 for the signaling connection.
  • The SDK now supports Server Name Indication (SNI) during initial TLS handshake with Twilio infrastructure.

Known Issues

  • The TVOCallMessageBuilder.contentType has no effect on the content type of the TVOCallMessage object. The content type always defaults to application/json.

Size Impact

ArchitectureCompressed SizeUncompressed Size
arm643.3 MB7.6 MB

August 26, 2024

Enhancements

  • The Call Message Events (Beta), originally released in 6.5.0, has been promoted to GA.
  • The error code TVOErrorCallMessageCallInUnexpectedStateError will be raised when [TVOCall sendMessage:] is invoked when the Call has not reached the ringing state yet. error 31211(link takes you to an external page)
  • Voice Insights publishing will fall back to sending uncompressed data if the compressed format is not supported.

API Changes

Bug Fixes

  • Fixed a bug where the SDK by default reports custom as the logger type to Voice Insights.

Known Issues

  • The TVOCallMessageBuilder.contentType has no effect on the content type of the TVOCallMessage object. The content type always defaults to application/json.

Size Impact

ArchitectureCompressed SizeUncompressed Size
arm643.3 MB7.5 MB

June 4, 2024

Enhancements

  • The Voice Insights data is now compressed before uploading to save network bandwidth.
  • Added new error code TVOErrorCallMessageCallInUnexpectedStateError in TVOError that happens [TVOCallInvite sendMessage:] is invoked when the Call Invite has not reached the ringing state yet. [TVOCallMessageDelegate messageFailedForCallSid:voiceEventSid:error:] callback will be invoked in this case with the above mentioned error code. error 31211(link takes you to an external page)

Size Impact

ArchitectureCompressed SizeUncompressed Size
arm643.3 MB7.5 MB

May 15, 2024

Enhancements

API Changes

  • The SDK no longer validates the value of TVOCallMessage.messageType and treats it as a pass-through for both inbound and outbound call messages. To send a user-defined message with the [TVOCall sendMessage:] or the [TVOCallInvite sendMessage:] method, set the messageType to user-defined-message.
  • The factory method [TVOCallMessage messageWithContent:] is deprecated in favor of the [TVOCallMessage messageWithContent:messageType:block:] method.
  • A new warning type TVOCallQualityWarningConstantAudioOutputLevel is added for TVOCallQualityWarning enum. This warning is raised when standard deviation of audio output levels for the last 10 samples is less than or equals 1% of the maximum possible audio output level of 32767, i.e. 327.67, and the call is not on hold by the local party. This warning is cleared when standard deviation of audio output levels for the last 10 samples is greater than 3% of the maximum possible audio output level, i.e. 983.01. Please note, if the remote party mutes the audio track or places the call on hold, this warning will still be raised.

Size Impact

ArchitectureCompressed SizeUncompressed Size
arm643.3 MB7.5 MB

April 17, 2024

Enhancements

  • Increased sampling resolution of Voice Insights call quality metrics events.
  • Added a missing API which is used internally by WebRTC to the SDK's privacy manifest.

Known Issues

  • The SDK collects API usage and WebRTC call quality data and sends it back as Twilio Voice Insights(link takes you to an external page) events for post-call quality analysis and debugging purposes. On iOS 17, Voice Insights data collection will be impacted if the application user does not allow tracking when prompted with iOS AppTrackingTransparency framework authorization alert. iOS 16 and earlier versions will not be affected by the Privacy Manifest that ships with the SDK XCFramework.

Size Impact

ArchitectureCompressed SizeUncompressed Size
arm643.3 MB7.5 MB

March 26, 2024

Bug Fixes

  • Fixed an issue where PrivacyInfo.xcprivacy file was causing a warning during app store submission.

Size Impact

ArchitectureCompressed SizeUncompressed Size
arm643.3 MB7.5 MB

March 12, 2024

API Changes

  • New TVOAudioOptions and TVOAudioOptionsBuilder APIs that enable audio processing operations to be performed on the local audio track/source has been added. You can use the TVOAudioOptionsBuilder class to create an instance of TVOAudioOptions. Please note that software Echo Cancellation and Automatic Gain Control for the microphone is not supported in iOS as WebRTC relies on OS provided capabilities.

    • Audio processing operations include noise suppression, high pass filtering, setting jitter buffer max size in packets, and setting jitter buffer minimum delay in milliseconds.
    • By default, noiseSuppression is set to false, highpassFilter is set to true, audioJitterBufferMaxPackets is set to 50 packets, and audioJitterBufferMinDelayMs is set to 0 milliseconds.
    • The default values can be modified and custom TVOAudioOptions can be set as part of TVOConnectOptions when making outbound calls and/or as part of TVOAcceptOptions when receiving incoming calls.

Please see the example below. In this example, high pass filtering is enabled, audioJitterBufferMaxPackets is set to 200 packets and audioJitterBufferMinDelayMs is set to 5 milliseconds.

1
2
let audioOptions = AudioOptions() { builder in
3
builder.audioJitterBufferMaxPackets = 200
4
builder.audioJitterBufferMinDelayMs = 5
5
builder.highpassFilter = true
6
}
7
8
let acceptOptions = TVOAcceptOptions(callInvite: callInvite) { builder in
9
builder.uuid = callInvite.uuid
10
builder.enableIceGatheringOnAnyAddressPorts = true
11
builder.audioOptions = audioOptions;
12
}
13
14
let call = callInvite.accept(with: acceptOptions, delegate: self)

Size Impact

ArchitectureCompressed SizeUncompressed Size
arm643.3 MB7.5 MB

February 12, 2024

Enhancements

  • The SDK now includes the privacy manifest in the XCFramework. The SDK collects analytic data such as API usage and WebRTC stats when the TwilioVoiceSDK.insights property is enabled.
  • Added new Call Error, TVOErrorInvalidCallerIDError that happens when a call is attempted with an invalid caller id error 13214.

API Changes

  • The current set of TVOCallMessageDelegate callback methods have been deprecated and will be removed in a future release in favor of the new callback methods. Please note that the new APIs work for both TVOCallInvite and TVOCall.

See examples as follows:

1
2
// MARK: - TVOCallMessageDelegate
3
func messageSent(callSid: String, voiceEventSid: String) {
4
NSLog("Call message sent. Voice Event SID: \(voiceEventSid)")
5
}
6
7
func messageFailed(callSid: String, voiceEventSid: String, error: Error) {
8
NSLog("Failed to send call message. Voice Event SID: \(voiceEventSid). Error: \(error.localizedDescription)")
9
}
10
11
func messageReceived(callSid: String, message: CallMessage) {
12
NSLog("Call message received: \(callMessage.content)")
13
}

Size Impact

ArchitectureCompressed SizeUncompressed Size
arm643.3 MB7.5 MB

November 30, 2023

Enhancements

  • This release is based on Chromium WebRTC 112.

Size Impact for 6.10.0

ArchitectureCompressed SizeUncompressed Size
arm643.2 MB7.4 MB

November 9, 2023

Bug Fixes

  • Fixed a crash when the background signaling thread is accessing the memory while the TVOCall object has been destroyed.

Size Impact for 6.9.2

ArchitectureCompressed SizeUncompressed Size
arm643.3 MB7.5 MB

October 02, 2023

API Changes

  • New thread property is added to the TVOLogParameters class to specify thread name or thread id in the log.

Bug Fixes

  • Fixed a bug where the incoming call answer timeout value might not be applied.
  • Fixed a crash when SDK is tearing down the incoming call ringing monitor.

Size Impact for 6.9.1

ArchitectureCompressed SizeUncompressed Size
arm644.2 MB12.6 MB

September 05, 2023

Enhancement

  • In this release a new protocol TVOLogger is added. Users can implement this protocol to create their own custom logger.

API Changes

  • New TVODefaultLogger class is added. Users can use it to send their app logs to standard output.
  • A new logger property of type TVOLogger is added to TwilioVoiceSDK. You can set this property to your custom logger instance. The SDK will return an instance of DefaultLogger by default. If you intend to use SDK's logger utility to log your app logs, you can use DefaultLogger to do so.
  • New TVOLogParameters class is added to pass log statement related parameters to the user defined logger implementation.
  • TVOLogLevel and TVOLogModule enums have been moved to the new TVOLogParameters header file.
1
2
class CustomLogger:NSObject {
3
//.. Your custom logger definition
4
}
5
6
extension CustomLogger:Logger {
7
func log(params logParameters: LogParameters!) {
8
print("\(logParameters.logModule) - \(logParameters.logLevel) - \(logParameters.message)");
9
}
10
}
11
12
let logger = CustomLogger()
13
TwilioVoiceSDK.logger = logger
14

Size Impact for 6.9.0

ArchitectureCompressed SizeUncompressed Size
arm644.2 MB12.6 MB

June 23, 2023

API Changes

  • The TVOAudioDeviceFormatChanged method is now marked as deprecated and will be removed in v7.0. Use TVOAudioDeviceReinitialize instead.

Bug Fixes

  • Fixed a bug where the incoming call invite can only ring up to 3 minutes instead of the maximum 10 minutes call timeout). Note that on iOS 16 and later versions CallKit will dismiss the incoming call in one minute by raising the CXProviderDelegate [provider:performEndCallAction:] callback.

Size Impact for 6.8.1

ArchitectureCompressed SizeUncompressed Size
arm644.1 MB12.5 MB

June 13, 2023

Enhancements

  • This release uses WebRTC M105.

Size Impact for 6.8.0

ArchitectureCompressed SizeUncompressed Size
arm644.1 MB12.5 MB

May 17, 2023

API Updates

  • The SDK now supports sending and receiving user-defined messages via the TVOCallInvite before it is answered or rejected. Sending user-defined messages while call is still ringing (before connected) is also supported now.

Example of sending and receiving call messages via the TVOCallInvite:

1
// Pass `CallMessageDelegate` in the `handleNotification()` method
2
TwilioVoiceSDK.handleNotification(payload.dictionaryPayload, delegate: self, delegateQueue: nil, callMessageDelegate: self)
3
4
// MARK: - NotificaitonDelegate
5
func callInviteReceived(callInvite: CallInvite) {
6
let message = "{ \"foo\": \"bar\", \"marco\": \"polo\" }"
7
let callMessage = CallMessage(content: message)
8
9
// voiceEventSid can be used for tracking the message
10
let voiceEventSid = callInvite.sendMessage(callMessage)
11
}
12
13
// MARK: - CallMessageDelegate
14
func callInviteDidSendMessage(callInvite: CallInvite, voiceEventSid: String) {
15
NSLog("Call message sent. Voice Event SID: \(voiceEventSid)")
16
}
17
18
func callInviteDidFailToSendMessage(callInvite: CallInvite, voiceEventSid: String, error: Error) {
19
NSLog("Failed to send call message. Voice Event SID: \(voiceEventSid). Error: \(error.localizedDescription)")
20
}
21
22
func callInviteDidReceiveMessage(callInvite: CallInvite, callMessage: CallMessage) {
23
NSLog("Call message received: \(callMessage.content)")
24
}

Size Impact for 6.7.0

ArchitectureCompressed SizeUncompressed Size
arm643.9 MB11.4 MB

May 12, 2023

API updates

  • TVODefaultAudioDevice class now has a property ignoresPreferredAttributeConfigurationErrors to ignore errors during AVAudioSession setup. This is to mitigate the WebRTC issue reported here(link takes you to an external page)

Size Impact for 6.5.2

ArchitectureCompressed SizeUncompressed Size
arm643.2 MB7.1 MB

December 5, 2022

API updates

  • The SDK now supports sending and receiving in-call user-defined messages. Use the [TVOCall sendMessage:] method to send messages. Endpoints subscribed to the events of the call will be receiving the messages. The [TVOCallMessageDelegate call:didReceiveMessage:] callback will be raised to the application when a message is received by the client.

    Please visit this page for more details about this feature. Additionally, please see the following for more information on how to send and receive messages on the server.

    NOTE: This feature should not be used with PII.

  • The TVOCallMessage class and the TVOCallMessageBuilder class are introduced to represent the call messages.

Example of sending a call message:

1
let call = TwilioVoiceSDK.connect(options: connectOptions, delegate: self)
2
3
// wait for call to be connected
4
5
let message = "{ \"foo\": \"bar\", \"marco\": \"polo\" }"
6
let callMessage = CallMessage(content: message)
7
8
// voiceEventSid can be used for tracking the message
9
let voiceEventSid = call.sendMessage(callMessage)
10
11
extension ViewController: CallMessageDelegate {
12
func callDidSendMessage(call: Call, voiceEventSid: String) {
13
NSLog("Call message sent. Voice Event SID: \(voiceEventSid)")
14
}
15
16
func callDidFailToSendMessage(call: Call, voiceEventSid: String, error: Error) {
17
NSLog("Failed to send call message. Voice Event SID: \(voiceEventSid). Error: \(error.localizedDescription)")
18
}
19
}

Example of handling incoming call messages:

1
extension ViewController: CallMessageDelegate {
2
3
func callDidReceiveMessage(call: Call, message callMessage: CallMessage) {
4
NSLog("Call message received. Message: \(callMessage.content)")
5
}
6
7
}

Size Impact for 6.5.0

ArchitectureCompressed SizeUncompressed Size
arm643.2 MB7.1 MB


July 11, 2022

API Updates

  • The writable property of the TVOIceCandidatePairStats class has been renamed to writeable.
  • New edge umatilla is now supported. Set the TwilioVoiceSDK.edge property before connecting or accepting the call.

Bug Fixes

  • Fixed a symbol conflict (RTCNativeAudioSessionDelegateAdapter) when using the SDK side by side with another WebRTC library.

Size Impact for 6.4.2

ArchitectureCompressed SizeUncompressed Size
arm643.2 MB7.0 MB


May 26, 2022

Bug Fixes

  • Fixed a crash when the home region specifier (twr) in the access token is null.

Size Impact for 6.4.1

ArchitectureCompressed SizeUncompressed Size
arm643.2 MB7.0 MB


May 3, 2022

API updates

  • The Voice iOS SDK now supports Twilio Regional by providing the home region specifier in the access token header when calling the TwilioVoiceSDK.register() method, the TwilioVoiceSDK.unregister() method, and the TwilioVoiceSDK.connect() method.

Existing customers can now migrate their Voice use-cases to data centers in Ireland or Australia to establish data residency within the region. In addition, new customers may now select Ireland or Australia as their region of choice for Voice related use cases. There is no additional cost to use the new data centers in Ireland or Australia. To learn more about Regional Voice, check out our blog post(link takes you to an external page) or head over to our developer docs to get started.

Example of specifying home region in the access token using the Twilio Node.js(link takes you to an external page) helper library:

1
const accessToken = new twilio.jwt.AccessToken(
2
credentials.accountSid,
3
credentials.apiKeySid,
4
credentials.apiKeySecret, {
5
identity,
6
ttl,
7
region: 'au1',
8
},
9
);
10

The decoded header of your access token should looks like this:

1
{
2
"alg": "HS256",
3
"typ": "JWT",
4
"cty": "twilio-fpa;v=1",
5
"twr": "au1"
6
}

Maintenance

  • Updated API doc of [TVOCall getStatsWithBlock:].

Known Issues

  • Using the Voice iOS SDK side by side with the WebRTC library will result in RTCNativeAudioSessionDelegateAdapter symbol conflict during compile time.

Size Impact for 6.4.0

ArchitectureCompressed SizeUncompressed Size
arm643.2 MB7.0 MB


February 8, 2022

Enhancements

  • The Voice SDK now validates full remote domain names while setting up the TLS connection.

Known Issues

  • Using the Voice iOS SDK side by side with the WebRTC library will result in RTCNativeAudioSessionDelegateAdapter symbol conflict during compile time.

Size Impact for 6.3.1

ArchitectureCompressed SizeUncompressed Size
arm643.2 MB7.0 MB


May 17, 2021

Enhancements

  • This release is based on Chromium WebRTC 88.
  • The simulator arm64 architecture on Apple Silicon Macs is now available.
  • The SDK uses Unified Plan SDP semantics instead of Plan-B.

Known Issues

  • Carthage is not currently a supported distribution mechanism for Twilio Voice. Carthage does not currently work with .xcframeworks as documented here(link takes you to an external page). Once Carthage supports binary .xcframeworks, Carthage distribution will be re-added.
  • Using the Voice iOS SDK side by side with the WebRTC library will result in RTCNativeAudioSessionDelegateAdapter symbol conflict during compile time.

Size Impact for 6.3.0

ArchitectureCompressed SizeUncompressed Size
arm643.2 MB7.1 MB


March 29, 2021

Bug Fixes

  • Fixed a potential crash in the core module where the logger could be accessed after being destroyed by another thread. #419(link takes you to an external page)
  • Fixed a bug where caller might not receive the [TVOCallDelegate call:didDisconnectiWithError:] callback when callee hangs up.
  • Fixed a bug where callee was not receiving the [TVONotificationDelegate cancelledCallInviteReceived:error:] callback when signaling connection error happens.

Known Issues

  • Using the Voice iOS SDK side by side with the WebRTC library will result in RTCNativeAudioSessionDelegateAdapter symbol conflict during compile time.

Size Impact for 5.5.2

ArchitectureApp Download SizeApp Storage Size
Universal3.0 MB6.7 MB
arm643.0 MB6.7 MB


March 11, 2021

Bug Fixes

  • Fixed the SDK version number in the Info.plist file of the framework.
  • Fixed a potential crash in the core module where the logger could be accessed after being destroyed by another thread. #419(link takes you to an external page)

Known Issues

  • The TwilioVoice.xcframework does not currently support the simulator on Apple Silicon arm64 Macs.
  • Carthage is not currently a supported distribution mechanism for Twilio Voice. Carthage does not currently work with .xcframeworks as documented here(link takes you to an external page). Once Carthage supports binary .xcframeworks, Carthage distribution will be re-added.
  • Using the Voice iOS SDK side by side with the WebRTC library will result in RTCNativeAudioSessionDelegateAdapter symbol conflict during compile time.

Size Impact for 6.2.2

ArchitectureCompressed SizeUncompressed Size
arm643.1 MB7.0 MB


February 4, 2021

Bug Fixes

  • Fixed platform version in podspecs.

Known Issues

  • The TwilioVoice.xcframework does not currently support the simulator on Apple Silicon arm64 Macs.
  • Carthage is not currently a supported distribution mechanism for Twilio Voice. Carthage does not currently work with .xcframeworks as documented here(link takes you to an external page). Once Carthage supports binary .xcframeworks, Carthage distribution will be re-added.
  • Using the Voice iOS SDK side by side with the WebRTC library will result in RTCNativeAudioSessionDelegateAdapter symbol conflict during compile time.

Size Impact for 6.2.1

ArchitectureCompressed SizeUncompressed Size
arm643.1 MB7.0 MB


February 1, 2021

Enhancements

  • The Voice iOS SDK is built with Xcode 12.0.
  • Twilio Voice is now delivered as an .xcframework. The .xcframework package includes the .dSYM and .bcsymbolmap files to allow developers to symbolicate crash reports.
  • Twilio Voice is now distributed as a Swift Package.

Known Issues

  • The TwilioVoice.xcframework does not currently support the simulator on Apple Silicon arm64 Macs.
  • Carthage is not currently a supported distribution mechanism for Twilio Voice. Carthage does not currently work with .xcframeworks as documented here(link takes you to an external page). Once Carthage supports binary .xcframeworks, Carthage distribution will be re-added.
  • Using the Voice iOS SDK side by side with the WebRTC library will result in RTCNativeAudioSessionDelegateAdapter symbol conflict during compile time.

Size Impact for 6.2.0

ArchitectureCompressed SizeUncompressed Size
arm643.1 MB7.0 MB


January 7, 2021

Enhancements

  • Private IP addresses are masked in Release mode for the SDK logs and the ice-candidate Insights event payload.
  • Private IP addresses will not be masked in Debug mode. The selected-ice-candidate-pair event will contain private IP address of the local active ICE candidate for debugging purpose in both Release and Debug modes.

Bug fixes

  • Fixed a bug where caller might not receive the call:didDisconnectWithError: callback when the callee hangs up.
  • Fixed a bug where callee was not receiving the cancelledCallInviteReceived:error: callback when signaling connection error happens.
  • The Voice SDK had the same TwilioVoice framework name and the class name. This was causing swift compile time errors when an app tries to access a TwilioVoice framework's class using the module name, e.g. TwilioVoice.ConnectOptions. Fixed this issues by renaming the TwilioVoice class name to TwilioVoiceSDK.

Known Issues

  • Using the Voice iOS SDK side by side with the WebRTC library will result in RTCNativeAudioSessionDelegateAdapter symbol conflict during compile time.

Size impact for 6.1.0

ArchitectureApp Download SizeApp Storage Size
Universal3.1 MB6.9 MB
arm643.1 MB6.9 MB


November 4, 2020

Bug fixes

  • Fixed Swift compile time error for AudioDeviceWorkerBlock.

Known Issues

  • Using the Voice iOS SDK side by side with the WebRTC library will result in RTCNativeAudioSessionDelegateAdapter symbol conflict during compile time.

Size impact for 6.0.2

ArchitectureApp Download SizeApp Storage Size
Universal3.1 MB6.8 MB
arm643.1 MB6.8 MB


November 2, 2020

Bug fixes

  • Fixed Swift compile time error for AudioDeviceContext.

Known Issues

  • Using the Voice iOS SDK side by side with the WebRTC library will result in RTCNativeAudioSessionDelegateAdapter symbol conflict during compile time.

Size impact for 6.0.1

ArchitectureApp Download SizeApp Storage Size
Universal3.1 MB6.8 MB
arm643.1 MB6.8 MB


September 15, 2020

API change

  • The Voice SDK has been updated for better Swift interoperability.

    • The TVO prefix has been removed from all Twilio Voice types
    • Many of the delegate function declarations have been revamped for better clarity of their intent
    • Some of the class method declarations have been revamped for better clarity of their intent
  • This release has improved API for CallKit integration. In order to use CallKit with SDK, you must set ConnectOptions.uuid or AcceptOptions.uuid while making or answering a Call. When ConnectOptions.uuid or AcceptOptions.uuid is set, it is your responsibility to enable and disable the audio device. You should enable the audio device in [CXProviderDelegate provider:didActivateAudioSession:], and disable the audio device in [CXProviderDelegate provider:didDeactivateAudioSession:].

1
func provider(_ provider: CXProvider, didActivate audioSession: AVAudioSession) {
2
audioDevice.isEnabled = true
3
}
4
5
func provider(_ provider: CXProvider, didDeactivate audioSession: AVAudioSession) {
6
audioDevice.isEnabled = false
7
}
8
9
func providerDidReset(_ provider: CXProvider) {
10
audioDevice.isEnabled = false
11
}

If you are not using CallKit in your app, you must not set ConnectOptions.uuid or AcceptOptions.uuid while making or answering a call. The Voice SDK will enable the audio device for you when the uuid is nil.

  • The uuid property of TVOCall is now optional.
  • This release changes the underlying behavior of [TVOCallDelegate callDidConnect:] such that it is raised when both ICE connection state is connected and DTLS negotiation has completed. Previously [TVOCallDelegate callDidConnect:] was raised when the DTLS negotiation had completed.
  • In this release, [TVOCallDelegate callDidConnect:] is raised when both the ICE connection state is connected and DTLS negotiation has completed. There is no change in behavior however the SDK can detect DTLS failures and raise kTVOMediaDtlsTransportFailedErrorCode if they occur.
  • Defined new error code
Error CodesErrorCodeError Message
53407TVOMediaDtlsTransportFailedErrorCodeMedia connection failed due to DTLS handshake failure
  • PeerConnection state is now reported to Insights
Event GroupLevelEvent NameDescription
pc-connection-stateDEBUGnewRaised when peer connection state is new
pc-connection-stateDEBUGconnectingRaised when peer connection state is connecting
pc-connection-stateDEBUGconnectedRaised when peer connection state is connected
pc-connection-stateDEBUGdisconnectedRaised when peer connection state is disconnected
pc-connection-stateERRORfailedRaised when peer connection state is failed
pc-connection-stateDEBUGclosedRaised when peer connection state is closed
  • Removed the deprecated property TwilioVoice.region. Use TwilioVoice.edge to control the connectivity with Twilio.

  • The [TwilioVoice registerWithAccessToken:deviceTokenData:completion:] and the [TwilioVoice unregisterWithAccessToken:deviceTokenData:completion:] have been renamed to replace the [TwilioVoice registerWithAccessToken:deviceToken:completion:] and the [TwilioVoice unregisterWithAccessToken:deviceToken:completion:] methods and now take the NSData type device token as parameter.

Enhancements

  • This release is based on Chromium WebRTC 83.
  • TwilioVoice.framework is now built with Xcode 11.4.1
  • A new Insights event selected-ice-candidate-pair is reported with the active local ICE candidate and remote ICE candidate.
Event GroupLevelEvent NameDescription
ice-candidateDEBUGselected-ice-candidate-pairRaised when the active local and remote ICE candidates of the peer connection are determined
  • mos calculation algorithm has been updated to make it monotonically decreasing with increasing jitter and packets-lost-fraction values over a range of rtt values. The final mos should always be in the range [1.0, 4.6].

Maintenance

Bug fixes

  • Fixed a crash when processing of empty stats reports or stats reports without remote audio tracks.

Known Issues

  • Using the Voice iOS SDK side by side with the WebRTC library will result in RTCNativeAudioSessionDelegateAdapter symbol conflict during compile time.

Size impact for 6.0.0

ArchitectureApp Download SizeApp Storage Size
Universal3.1 MB6.8 MB
arm643.1 MB6.8 MB


September 15, 2020

Bug Fixes

  • Fixed the background task handling in [TVOCall disconnect], [TVOCallInvite reject], [TwilioVoice registerWithAccessToken:deviceTokenData:completion:] and [TwilioVoice unregisterWithAccessToken:deviceTokenData:completion:]. iOS should no longer report a background task risk of termination warning.
  • Fixed a crash when processing of empty stats reports or stats reports without remote audio tracks.

Known Issues

  • Using the Voice iOS SDK side by side with the WebRTC library will result in RTCNativeAudioSessionDelegateAdapter symbol conflict during compile time.

Size Impact for 5.5.1

ArchitectureApp Download SizeApp Storage Size
Universal2.9 MB6.7 MB
arm642.9 MB6.7 MB


July 9, 2020

API Change

  • A TVOCallerInfo class is introduced to represent information about the caller. Currently, this information is limited to SHAKEN/STIR status of incoming PSTN Calls, but may later be expanded to include CNAM, and other endpoint types. The verified property represents whether or not the caller's phone number has been verified by Twilio using SHAKEN/STIR validation. The value of this attribute is true if the caller has been validated at 'A' level, false if the caller has been verified at any lower level or has failed validation. If SHAKEN/STIR information is unavailable for the caller or stir status value is null, the property will be nil. For details on how Twilio uses SHAKEN/STIR to make trusted calls and protect against unlawful spoofing, please visit /docs/voice/trusted-calling-using-shakenstir.

  • New property callerInfo in TVOCallInvite returns the TVOCallerInfo object to represent the information about the caller.

Known Issues

  • Using the Voice iOS SDK side by side with the WebRTC library will result in RTCNativeAudioSessionDelegateAdapter symbol conflict during compile time.

Size Impact for 5.5.0

ArchitectureApp Download SizeApp Storage Size
Universal2.9 MB6.7 MB
arm642.9 MB6.7 MB


June 25, 2020

Bug Fixes

  • Fixed a crash that could occur when destroying the TVOCall or TVOCallInvite object.

Known Issues

  • Using the Voice iOS SDK side by side with the WebRTC library will result in RTCNativeAudioSessionDelegateAdapter symbol conflict during compile time.

Size Impact for 5.4.1

ArchitectureApp Download SizeApp Storage Size
Universal2.9 MB6.7 MB
arm642.9 MB6.7 MB


June 3, 2020

API Change

  • This release includes support for the expansion of Twilio's Global Infrastructure via Edge Locations which allows customers to control their connectivity into and out of Twilio's platform. The Voice iOS SDK uses these Edges to connect to Twilio's infrastructure via the new property TwilioVoice.edge. This new property supersedes the now deprecated TwilioVoice.region. See the new Edge names and how they map to the old region names.

Here is an example

1
// Connect using global low latency
2
TwilioVoice.edge = "roaming"
  • This release also adds the Mean Opinion Score (MOS) measurement mos to TVORemoteAudioTrackStats. Use [TVOCall getStatsWithBlock:] during a call to retrieve the score. The mos is computed once per second. Since the MOS is calculated from network performance measurements, it can be used to indicate the current network condition to the user to provide better usability. See API Docs(link takes you to an external page) for more information

Example

1
call.getStatsWith { (reports) in
2
for report in reports {
3
let remoteAudioTracksStats = report.remoteAudioTrackStats
4
let mosLabel = "\(remoteAudioTracksStats.mos)"
5
}
6
}

Enhancements

  • Network degradation warnings were previously only logged to Insights. With this release, a new TVOCallDelegate method call:didReceiveQualityWarnings:previousWarnings: is also invoked when the SDK detects those degradations. Use these to relay network condition to the user to provide a better user experience. See the delegate method(link takes you to an external page) and callQualityWarnings(link takes you to an external page) for more information.

  • The Mean Opinion Score (MOS) is now available in TVOStatsReport. Use [TVOCall getStatsWithBlock:] during a Call to retrieve the score. Since the MOS is calculated from network performance measurements, it can be used to indicate the current network condition to the user to provide better usability.

  • By default ICE gathering is done on all interfaces except some VPN type interfaces. This makes it impossible to connect to Twilio in networks that require the use of VPN. In this release, the new Boolean property enableIceGatheringOnAnyAddressPorts in TVOCallOptionsBuilder allows the gathering of ICE candidates from all available interfaces. This should be used in those networks where the default does not work. See enableIceGatheringOnAnyAddressPorts(link takes you to an external page) for more information.

Deprecations

  • TwilioVoice.region is now deprecated. Use TwilioVoice.edge instead. See the new Edge names for possible values.

Bug Fixes

  • Fixed a bug where the SDK was still raising the [TVOCallDelegate callDidStartRinging:] callback if [TVOCall disconnect] was called.
  • Fixed a crash caused by a signaling race condition when user rejects a TVOCallInvite.

Other

  • armv7 builds are no longer available or supported.

Known Issues

  • Using the Voice iOS SDK side by side with the WebRTC library will result in RTCNativeAudioSessionDelegateAdapter symbol conflict during compile time.

Size Impact for 5.4.0

ArchitectureApp Download SizeApp Storage Size
Universal2.9 MB7.0 MB
arm642.8 MB6.9 MB

5.3.1

April 9, 2020

Improvements

  • Optimized [TwilioVoice unregisterWithAccessToken:deviceTokenData:completion:] by reducing the number of network requests.
  • Added background handling support to [TwilioVoice registerWithAccessToken:deviceTokenData:completion:] and [TwilioVoice unregisterWithAccessToken:deviceTokenData:completion:]. They will now finish execution even when the app is backgrounded.

Known Issues

  • Using the Voice iOS SDK side by side with the WebRTC library will result in RTCNativeAudioSessionDelegateAdapter symbol conflict during compile time.

Size Impact for 5.3.1

ArchitectureApp Download SizeApp Storage Size
Universal6.0 MB12.7 MB
arm642.8 MB6.9 MB
armv73.0 MB5.7 MB


March 18, 2020

API Changes

  • New methods to register and unregister for VoIP push notifications have been added that rely on NSData rather than NSString. The previous register and unregister methods have been deprecated in favor of these new methods.
1
// TwilioVoice.h
2
3
+ (void)registerWithAccessToken:(nonnull NSString *)accessToken
4
deviceTokenData:(nonnull NSData *)deviceTokenData
5
completion:(nullable void(^)(NSError * __nullable error))completion
6
NS_SWIFT_NAME(register(withAccessToken\:deviceToken\:completion:));
7
8
+ (void)unregisterWithAccessToken:(nonnull NSString *)accessToken
9
deviceTokenData:(nonnull NSData *)deviceTokenData
10
completion:(nullable void(^)(NSError * __nullable error))completion
11
NS_SWIFT_NAME(unregister(withAccessToken\:deviceToken\:completion:));

Swift example

1
func pushRegistry(_ registry: PKPushRegistry, didUpdate credentials: PKPushCredentials, for type: PKPushType) {
2
TwilioVoice.register(withAccessToken: accessToken, deviceToken: credentials.token) { (error) in
3
if let error = error {
4
NSLog("An error occurred while registering: \(error.localizedDescription)")
5
} else {
6
NSLog("Successfully registered for VoIP push notifications.")
7
}
8
}
9
}

Objective-C example

1
- (void)pushRegistry:(PKPushRegistry *)registry
2
didUpdatePushCredentials:(PKPushCredentials *)credentials
3
forType:(NSString *)type {
4
[TwilioVoice registerWithAccessToken:accessToken
5
deviceTokenData:credentials.token
6
completion:^(NSError *error) {
7
if (error) {
8
NSLog(@"An error occurred while registering: %@", [error localizedDescription]);
9
} else {
10
NSLog(@"Successfully registered for VoIP push notifications.");
11
}
12
}];
13
}

Bug Fixes

  • Fixed Voice Insights data with valid transport_id value.

Known Issues

  • Using the Voice iOS SDK side by side with the WebRTC library will result in RTCNativeAudioSessionDelegateAdapter symbol conflict during compile time.

Size Impact for 5.3.0

ArchitectureApp Download SizeApp Storage Size
Universal6.0 MB12.7 MB
arm642.8 MB6.9 MB
armv73.0 MB5.7 MB


March 11, 2020

Bug Fixes

  • Fixed duplicated symbol linker errors in the static library.

Known Issues

  • Using the Voice iOS SDK side by side with the WebRTC library will result in RTCNativeAudioSessionDelegateAdapter symbol conflict during compile time.

Size Impact for 5.2.1

ArchitectureApp Download SizeApp Storage Size
Universal6.0 MB12.7 MB
arm642.8 MB6.9 MB
armv73.0 MB5.7 MB


February 27, 2020

Enhancements

  • Attempts to re-establish the media connection will be done preemptively if no media flow is detected for 3 seconds.
  • An ongoing call will automatically switch to a more preferred network type if one becomes available. The following are the network types listed in preferred order: ETHERNET, LOOPBACK, WIFI, VPN, and CELLULAR. For example, if a WIFI network becomes available whilst in a call that is using CELLULAR data, the call will automatically switch to using the WIFI network.
  • Proper data types are added to the Insights event payload.

Bug Fixes

  • Fixed a crash when a canceled call invite is received but the from value is nil.

Things to Note

  • Since media and signaling reconnect are two completely separate processes, it is likely that for a single network change event multiple [TVOCallDelegate call:isReconnectingWithError:] and [TVOCallDelegate callDidReconnect:] callbacks will be received in the order specified i.e a [TVOCallDelegate call:isReconnectingWithError:] callback will always be followed by a [TVOCallDelegate callDidReconnect:] callback.

Known Issues

  • Using the Voice iOS SDK side by side with the WebRTC library will result in RTCNativeAudioSessionDelegateAdapter symbol conflict during compile time.

Size Impact for 5.2.0

ArchitectureApp Download SizeApp Storage Size
Universal6.0 MB12.7 MB
arm642.8 MB6.9 MB
armv73.0 MB5.6 MB


February 24, 2020

Bug Fixes

  • Fixed a crash when a canceled call invite is received and the from value is nil.

Known Issues

  • Using the Voice iOS SDK side by side with the WebRTC library will result in RTCNativeAudioSessionDelegateAdapter symbol conflict during compile time.

Size Impact for 5.1.2

ArchitectureApp Download SizeApp Storage Size
Universal6.0 MB12.6 MB
arm642.8 MB6.8 MB
armv73.0 MB5.6 MB


December 9, 2019

Enhancements

  • Application name, bundle ID, version, build number, Xcode version and min/major SDK version are now published to Insights. This helps with isolating problems if an issue is encountered.

Known Issues

  • Using the Voice iOS SDK side by side with the WebRTC library will result in RTCNativeAudioSessionDelegateAdapter symbol conflict during compile time.

Size Impact for 5.1.1

ArchitectureApp Download SizeApp Storage Size
Universal6.0 MB12.6 MB
arm642.8 MB6.8 MB
armv73.0 MB5.6 MB


November 19, 2019

Enhancements

  • Incoming call handling improvements. Previously, if we encountered network issues before an incoming call was answered or rejected, we disconnected the call. With this release, we will continue to try and establish a connection to Twilio for a maximum of 40 seconds before we disconnect the call.
  • We added support for OpenSSL 1.1.x in the static library version of our SDK. To use this flavor of the SDK, please refer to the instructions included in the Static Library(link takes you to an external page)
  • We now publish the negotiated codec and its associated parameters to Insights.
Event GroupLevelEvent NameDescription
settingsINFOcodecRaised when the codec has been selected

Other Improvements

  • Improved the way we perform DNS resolution. Previously, some DNS requests could indirectly block the main thread. This is no longer the case.
  • listening-error event level was incorrectly reported as INFO instead of ERROR to insights.

Deprecated

  • Removed support for the iOS i386 architecture (32-bit iOS Simulator)

Known Issues

  • Using the Voice iOS SDK side by side with the WebRTC library will result in RTCNativeAudioSessionDelegateAdapter symbol conflict during compile time.

Size Impact for 5.1.0

ArchitectureApp Download SizeApp Storage Size
Universal5.9 MB12.6 MB
arm642.8 MB6.8 MB
armv73.0 MB5.6 MB


September 19, 2019

iOS 13 & Xcode 11 Support

ios-13--xcode-11-support page anchor

This release adds support for the new PushKit push notification policy(link takes you to an external page) that iOS 13 and Xcode 11 introduced. To upgrade your application please follow the migration guide(link takes you to an external page).

Insights

To provide observability for incoming call cancellations the following Insights events have been added:

Event GroupEvent NameLevelDescription
connectionlisteninfoReported when an attempt to listen for cancellations is made
connectionlisteninginfoReported when an attempt to listen for cancellations has succeeded
connectioncancelinfoReported when a cancellation has been reported
connectionlistening-errorerrorReported when an attempt to listen for a cancellation has failed
registrationunsupported-cancel-message-errorerrorReported when a "cancel" push notification is processed by the SDK. This version of the SDK does not support "cancel" push notifications

API Changes

  • Starting with 5.0.0, when [TwilioVoice registerWithAccessToken:deviceToken:completion:] is called, the Voice SDK will only register for "call" push notifications and cancelled call invites will be determined internally by the SDK. [TwilioVoice handleNotification:delegate:delegateQueue:] no longer processes "cancel" push notification payloads and will returnfalse if provided with a cancel notification.

  • A valid call push notification, when passed to [TwilioVoice handleNotification:delegate:delegateQueue:], will still result in a TVOCallInvite being raised [TVONotificationDelegate callInviteReceived:]. A TVOCancelledCallInvite will be raised asynchronously via [TVONotificationDelegate cancelledCallInviteReceived:error:] if any of the following events occur:

    • The call is prematurely disconnected by the caller.
    • The callee does not accept or reject the call in approximately 30 seconds.
    • The Voice SDK is unable to establish a connection to Twilio. You must retain the TVOCallInvite to be notified of a cancellation via [TVONotificationDelegate cancelledCallInviteReceived:error:]. A TVOCancelledCallInvite will not be raised if the invite is accepted or rejected.
  • [TwilioVoice handleNotification:delegate:] is now [TwilioVoice handleNotification:delegate:delegateQueue:]

    • delegateQueue: the dispatch queue where the [TVONotificationDelegate cancelledCallInviteReceived:error:] callback is received. If nil is passed, the dispatch main queue will be used.
    • When a "call" notification is received, the Voice SDK will fire the [TVONotificationDelegate callInviteReceived:] callback synchronously.
    • When a "cancel" notification is received, the method will return false.
  • [TVONotificationDelegate cancelledCallInviteReceived:] is now [TVONotificationDelegate cancelledCallInviteReceived:error:]

    • The error indicates that the call was canceled as a result of an error. The error.code will be set to TVOErrorCallCancelledError if a caller cancels the call before the called party could answer the call.
  • The property enableInsights has been renamed to insights and moved from TVOCallOptions.h to TwilioVoice.h.

  • The property region has moved from TVOCallOptions.h to TwilioVoice.h. If you are specifying a region via the TwilioVoice.h region property you must now do so before [TwilioVoice connectWithAccessToken:delegate:] or [TwilioVoice handleNotification:delegate:delegateQueue:] is called.

  • Class method [TVOCallInvite isValid:] is added to TVOCallInvite for apps to validate whether the notification payload is a valid call notification sent by Twilio. A valid notification payload will result in a TVOCallInvite being returned via the [TVONotificationDelegate callInviteReceived:] callback when passed to [TwilioVoice handleNotification:delegate:delegateQueue:].

Known Issues

  • Using the Voice iOS SDK side by side with the WebRTC library will result in RTCNativeAudioSessionDelegateAdapter symbol conflict during compile time.

Size Impact for 5.0.0

ArchitectureApp Download SizeApp Storage Size
Universal5.9 MB12.6 MB
arm642.8 MB6.8 MB
armv73.0 MB5.6 MB


August 19, 2019

Enhancements

Differentiated Services Code Point (DSCP) Tagging API

differentiated-services-code-point-dscp-tagging-api page anchor

The Differentiated Services Code Point (DSCP) Tagging API allows you to mark the audio packets with Expedited Forwarding (EF) for the purposes of improved packet routing. When enabled, supporting networks will prioritize audio packet delivery for improved audio quality.

Use enableDscp to enable or disable DSCP tagging. Note, enableDscp is enabled by default. For example:

1
// Configure DSCP with `TVOConnectOptions`
2
let connectOptions = TVOConnectOptions(accessToken: accessToken) { (builder) in
3
builder.enableDscp = true
4
}
5
6
let call = TwilioVoice.connect(with: connectOptions, delegate: callDelegate)
1
// Configure DSCP with `TVOAcceptOptions`
2
let acceptOptions = TVOAcceptOptions(accessToken: accessToken) { (builder) in
3
builder.enableDscp = true
4
}
5
6
let call = callInvite.accept(with: acceptOptions, delegate: callDelegate)

For more information, refer to the docs(link takes you to an external page).

Known Issues

  • Using the Voice iOS SDK side by side with the WebRTC library will result in RTCNativeAudioSessionDelegateAdapter symbol conflict during compile time.

Size Impact for 4.3.0

ArchitectureApp Download SizeApp Storage Size
Universal5.9 MB12.4 MB
arm642.8 MB6.7 MB
armv73.0 MB5.5 MB


August 8, 2019

This release includes changes in how the static library libTwilioVoice.a is built and packaged. libTwilioVoice.a now contains all the dependencies of the static libraries. Use -lTwilioVoice in the Other Linker Flags setting to link the SDK. BoringSSL is not packaged as a separate artifact.

Known Issues

  • CLIENT-4943 Restrictive networks may fail unless ICE servers are provided via TVOConnectOptions or TVOAcceptOptions. ICE servers can be obtained from Twilio's Network Traversal Service.
  • Using the Voice iOS SDK side by side with the WebRTC library will result in RTCNativeAudioSessionDelegateAdapter symbol conflict during compile time.

Size Impact for 4.2.1

ArchitectureApp Download SizeApp Storage Size
Universal5.9 MB12.4 MB
arm642.7 MB6.7 MB
armv73.0 MB5.5 MB


August 7, 2019

Enhancements

Custom Parameters in Canceled Call Notification

You can now retrieve the custom parameters set in your TwiML application from TVOCancelledCallInvite. With this addition, you can for example, display a missed call notification with the caller's display name retrieved from the TVOCancelledCallInvite customParameters.

For more information, refer to the API docs(link takes you to an external page)

Pass custom parameters in TwiML

1
<?xml version="1.0" encoding="UTF-8"?>
2
<Response>
3
<Dial callerId="client:alice">
4
<Client>
5
<Identity>bob</Identity>
6
<Parameter name="caller_first_name" value="alice" />
7
<Parameter name="caller_last_name" value="smith" />
8
</Client>
9
</Dial>
10
</Response>

cancelledCallInvite.customParameters:

1
{
2
"caller_first_name" = "alice";
3
"caller_last_name" = "smith";
4
}

Known Issues

  • CLIENT-4943 Restrictive networks may fail unless ICE servers are provided via TVOConnectOptions or TVOAcceptOptions. ICE servers can be obtained from Twilio's Network Traversal Service.
  • Using the Voice iOS SDK side by side with the WebRTC library will result in RTCNativeAudioSessionDelegateAdapter symbol conflict during compile time.

Size Impact for 4.2.0

ArchitectureApp Download SizeApp Storage Size
Universal5.9 MB12.4 MB
arm642.7 MB6.7 MB
armv73.0 MB5.5 MB


July 15, 2019

New Features

Max Average Bandwidth API

By default, the Opus codec is set up with a transmission rate of around 32 kbps (40-50kbps on the wire). With this release, you are able to set a custom max average bitrate to better control how much bandwidth your VoIP application should use. See RFC-7587 section 7.1(link takes you to an external page) for information about Max Average Bitrate.

The main purpose of this API is to set a lower max average bitrate to minimise bandwidth usage. This is particularly useful in deployments where bandwidth is at a premium. Where bandwidth is not of concern, you do not need to use this API.

Max Average Bitrate can be set to as low as 6,000bps and as high as 51,000 bps. Values outside this range are ignored and the default Opus operation mode is used. See API Docs(link takes you to an external page) for more information.

As would be expected, lowering the max average bitrate impacts audio quality. We don't recommend setting max average bitrate to a value below 8,000 bps. On the other hand, setting values over 32,000 bps will have negligible audio quality improvements.

For example, to set a new max average bitrate to 16,000 bps:

1
let connectOptions = TVOConnectOptions(accessToken: accessToken) { (builder) in
2
builder.params = params
3
builder.preferredAudioCodecs = [TVOOpusCodec(maxAverageBitrate: 16000)]
4
}
5
6
let call = TwilioVoice.connect(with: connectOptions, delegate: callDelegate)

Other Enhancements

  • Programmable Voice iOS SDK transmits data for VoIP calls and for Insights(link takes you to an external page). With this release, we have reduced Insights related data consumption by around 25%. This was accomplished by reducing the events reporting interval.
  • CLIENT-6358 The SDK now reports ice-candidate events to Insights. These events are raised when OnIceCandidate is called on the PeerConnection.

Known Issues

  • CLIENT-4943 Restrictive networks may fail unless ICE servers are provided via TVOConnectOptions or TVOAcceptOptions. ICE servers can be obtained from Twilio's Network Traversal Service.
  • Using the Voice iOS SDK side by side with the WebRTC library will result in RTCNativeAudioSessionDelegateAdapter symbol conflict during compile time.

Size Impact for 4.1.0

ArchitectureApp Download SizeApp Storage Size
Universal5.9 MB12.4 MB
arm642.7 MB6.7 MB
armv73.0 MB5.5 MB

June 28, 2019

New Features

Reconnecting State API

This release introduces the new Reconnecting State API. This API adds a new state TVOCallStateReconnecting to TVOCallState and two new optional TVOCallDelegate methods, call:isReconnectingWithError: and callDidReconnect:.

Call reconnection capability has been available since SDK 3.0. For example, if a call is established over a Wi-Fi network and the Wi-Fi network becomes unavailable, the SDK will automatically switch the call over to the next available network.

This release adds the reconnection related callbacks. call:isReconnectingWithError: is invoked to indicate a call is being reconnected due to a network disruption or network switch over and callDidReconnect: is called once the call has been re-connected. You can use this information to provide intuitive feedback to your App user when a reconnection is taking place.

Enhancements

Passing a malformed callee to either [TwilioVoice connectWithAccessToken:] or [TwilioVoice connectWithOptions:delegate:] will now result in TVOErrorAddressIncompleteError

Migration Guide

Please refer to our migration guide(link takes you to an external page) for more information about migrating from 3.x.

Known Issues

  • Restrictive networks may fail unless ICE servers are provided via TVOConnectOptions or TVOAcceptOptions. ICE servers can be obtained from Twilio's Network Traversal Service.
  • Using the Voice iOS SDK side by side with the WebRTC library will result in RTCNativeAudioSessionDelegateAdapter symbol conflict during compile time.

Size Impact for 4.0.0

ArchitectureApp Download SizeApp Storage Size
Universal5.8 MB12.4 MB
arm642.7 MB6.7 MB
armv72.9 MB5.5 MB


June 6, 2019

Bug Fixes

Known Issues

  • CLIENT-4943 Restrictive networks may fail unless ICE servers are provided via TVOConnectOptions or TVOAcceptOptions. ICE servers can be obtained from Twilio's Network Traversal Service.
  • Using the Voice iOS SDK side by side with the WebRTC library will result in RTCNativeAudioSessionDelegateAdapter symbol conflict during compile time.

Size Report

ArchitectureApp Download SizeApp Storage Size
Universal5.8 MB12.4 MB
arm642.8 MB6.8 MB
armv73.0 MB5.6 MB


May 16, 2019

Enhancements

Improved error codes

We now surface more details about errors encountered during [TwilioVoice registerWithAccessToken:deviceToken:completion:](link takes you to an external page), [TwilioVoice unregisterWithAccessToken:deviceToken:completion:](link takes you to an external page), [TwilioVoice connectWithOptions:delegate:](link takes you to an external page), and [TVOCallInvite acceptWithOptions:delegate:](link takes you to an external page). Previously, these functions reported these errors with the generic error TVOErrorRegistrationError or TVOErrorConnectionError.

With the new error codes, you can make more informed decisions with how to remedy the problem. For example, TVOErrorBadRequestError and TVOErrorTooManyRequestsError indicate potential programming issues, while TVOErrorTokenAuthenticationRejected indicate an issue with your Access Token.

Please note, you may need to change your code if you have added special handling for TVOErrorRegistrationError or TVOErrorConnectionError.

For more information see the API docs(link takes you to an external page)

The following is a summary of the new codes available for [TwilioVoice registerWithAccessToken:deviceToken:completion:](link takes you to an external page), [TwilioVoice unregisterWithAccessToken:deviceToken:completion:](link takes you to an external page):

Error CodeValueError Message
TVOErrorBadRequestError31400Bad Request
TVOErrorForbiddenError31403Forbidden
TVOErrorNotFoundError31404Not Found
TVOErrorRequestTimeoutError31408Request Timeout
TVOErrorConflictError31409Conflict
TVOErrorUpgradeRequiredError31426Upgrade Required. This is most likely related to a TLS version not accepted by Twilio's infrastructure
TVOErrorTooManyRequestsError31429Too Many Requests
TVOErrorInternalServerError31500Internal Server Error
TVOErrorBadGatewayError31502Bad Gateway
TVOErrorServiceUnavailableError31503Service Unavailable
TVOErrorGatewayTimeoutError31504Gateway Timeout

The following is a summary of the new codes available for [TwilioVoice connectWithOptions:delegate:], and [TVOCallInvite acceptWithOptions:delegate:]:

Error CodeValueError Message
TVOErrorTransportError31009Transport Error
TVOErrorBadRequestError31400Bad Request
TVOErrorForbiddenError31403Forbidden
TVOErrorNotFoundError31404Not Found
TVOErrorRequestTimeoutError31408Request Timeout
TVOErrorTemporarilyUnavailableError31480Temporarily Unavailable
TVOErrorCallDoesNotExistError31481Call/Transaction Does Not Exist
TVOErrorBusyHereError31486Busy Here
TVOErrorRequestTerminatedError31487Request Terminated
TVOErrorInternalServerError31500Internal Server
TVOErrorBadGatewayError31502Bad Gateway
TVOErrorServiceUnavailableError31503Service Unavailable
TVOErrorGatewayTimeoutError31504Gateway Timeout
TVOErrorDNSResolutionError31530DNS Resolution Error
TVOErrorBusyEverywhereError31600Busy Everywhere
TVOErrorDeclineError31603Decline
TVOErrorDoesNotExistAnywhereError31604Does Not Exist Anywhere

Known Issues

  • CLIENT-4943 Restrictive networks may fail unless ICE servers are provided via TVOConnectOptions or TVOAcceptOptions. ICE servers can be obtained from Twilio's Network Traversal Service.
  • Using the Voice iOS SDK side by side with the WebRTC library will result in RTCNativeAudioSessionDelegateAdapter symbol conflict during compile time.

Size Report

ArchitectureApp Download SizeApp Storage Size
Universal5.8 MB12.4 MB
arm642.8 MB6.8 MB
armv73.0 MB5.6 MB


April 25, 2019

We have promoted 3.0.0-beta13 to 3.0.0. Reference our migration guide(link takes you to an external page) to upgrade your applications to 3.0.

Known Issues

  • CLIENT-4943 Restrictive networks may fail unless ICE servers are provided via TVOConnectOptions or TVOAcceptOptions. ICE servers can be obtained from Twilio's Network Traversal Service.
  • Using the Voice iOS SDK side by side with the WebRTC library will result in RTCNativeAudioSessionDelegateAdapter symbol conflict during compile time.

Size Report

ArchitectureApp Download SizeApp Storage Size
Universal5.8 MB12.3 MB
arm642.8 MB6.8 MB
armv73.0 MB5.6 MB

April 18, 2019

Bug Fixes

  • CLIENT-5982 Fixed a bug where call quality warnings might be sent to Insights multiple times before the warning is cleared.

Known Issues

  • CLIENT-4943 Restrictive networks may fail unless ICE servers are provided via TVOConnectOptions or TVOAcceptOptions. ICE servers can be obtained from Twilio's Network Traversal Service.
  • Using the Voice iOS SDK side by side with the WebRTC library will result in RTCNativeAudioSessionDelegateAdapter symbol conflict during compile time.

Size Report

ArchitectureApp Download SizeApp Storage Size
Universal5.8 MB12.3 MB
arm642.8 MB6.8 MB
armv73.0 MB5.6 MB

April 17, 2019

Enhancements

  • CLIENT-5973 Removed TVOErrorConnectionTimeoutError, TVOErrorSignalingConnectionError, TVOErrorSignalingConnectionTimeoutError, TVOErrorSignalingIncomingMessageInvalidError, TVOErrorSignalingOutgoingMessageInvalidError, TVOErrorConfigurationAcquireFailedError and TVOErrorConfigurationAcquireTurnFailedError from TVOError.h.

Bug Fixes

  • CLIENT-5935 Fixed a bug where constant audio level warning events are being sent to Insights when the call is muted or onhold.
  • CLIENT-5969 Renamed kDefaultAVAudioSessionConfigurationBlock to kTVODefaultAVAudioSessionConfigurationBlock so that TwilioVoice.framework and TwilioVideo.framework may be used in the same application.
  • CLIENT-5977 Fixed a bug where the SDK was sending double values for packets_lost_fraction to Insights instead of integer.

Known Issues

  • CLIENT-4943 Restrictive networks may fail unless ICE servers are provided via TVOConnectOptions or TVOAcceptOptions. ICE servers can be obtained from Twilio's Network Traversal Service.
  • Using the Voice iOS SDK side by side with the WebRTC library will result in RTCNativeAudioSessionDelegateAdapter symbol conflict during compile time.

Size Report

ArchitectureApp Download SizeApp Storage Size
Universal5.8 MB12.3 MB
arm642.8 MB6.8 MB
armv73.0 MB5.6 MB

April 4, 2019

Enhancements

  • CLIENT-5379 Added network reachability monitoring for the signaling socket for a reliable network change detection.

Bug Fixes

  • CLIENT-5379 Fixed a bug where WiFi to WiFi network hand off was causing one-way audio followed by Call disconnect.

Known Issues

  • CLIENT-4943 Restrictive networks may fail unless ICE servers are provided via TVOConnectOptions or TVOAcceptOptions. ICE servers can be obtained from Twilio's Network Traversal Service.
  • Using the Voice iOS SDK side by side with the WebRTC library will result in RTCNativeAudioSessionDelegateAdapter symbol conflict during compile time.

Size Report

ArchitectureApp Download SizeApp Storage Size
Universal5.8 MB12.4 MB