2.x Changelog
Getting Started? Go for Programmable Voice SDK 5.x for iOS
If you are starting out with Twilio’s Programmable Voice SDK for iOS, we highly recommend version 5.0. Version 5.0 brings many new features and improvements to the 2.x version including: Opus Codec support, call parameters and contextual calling as well as Ringing State. It also adds support for iOS 13.
Support for 2.x ceased 1/1/2020
Not using 5.x? You should migrate ASAP
If you are not using 5.x, we highly recommend planning your migration as soon as possible. Check our migration guides when planning your migration.
2.1.1 (November 7, 2019)
- Programmable Voice iOS SDK 2.1.1 [Dynamic Framework], [Static Library], [docs]
Bug Fixes
- Fixed an issue which caused call accept failure. This occurred when the user denied mic access on an incoming call. With this change, mic permissions are no longer requested on an incoming call. They are requested when the user accepts the call.
2.1.0 (September 5, 2019)
- Programmable Voice iOS SDK 2.1.0 [Dynamic Framework], [Static Library], [docs]
iOS 13 & Xcode 11 Support & Migration Guide
This release adds support for the new PushKit push notification policy that iOS 13 and Xcode 11 introduced. To upgrade your application please follow the migration guide.
Insights
To provide observability for incoming call cancellations the following Insights events have been added:
Event Group | Event Name | Level | Description |
---|---|---|---|
connection |
listen |
info |
Reported when an attempt to listen for cancellations is made |
connection |
listening |
info |
Reported when an attempt to listen for cancellations has succeeded |
connection |
cancel |
info |
Reported when a cancellation has been reported |
connection |
listening-error |
error |
Reported when an attempt to listen for a cancellation has failed |
registration |
unsupported-cancel-message-error |
error |
Reported 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 2.1.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:]
no longer processes "cancel" push notification payloads and will returnfalse
if provided with a cancel notification. Once you register with the new SDK, your app will no longer receive push notifications for call invite cancellations, instead the SDK will initiate a connection when receiving a call invite and notify you via the notification delegate if the caller cancels the call. -
A valid call push notification, when passed to
[TwilioVoice handleNotification:delegate:]
, will still result in a TVOCallInvite being raised via the[TVONotificationDelegate callInviteReceived:]
callback. - The Voice SDK will return a
TVOCallInvite
object to you synchronously via the[TVONotificationDelegate callInviteReceived:]
method when[TwilioVoice handleNotification:delegate:]
is called. - The SDK will invoke the
[TVONotificationDelegate callInviteReceived:]
method asynchronously with aTVOCallInvite
object of stateTVOCallInviteStateCanceled
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.
The
[TVONotificationDelegate callInviteReceived:]
method will not be raised if the invite is accepted or rejected. - If the Voice SDK detects an error while executing
[TwilioVoice handleNotification:delegate:]
, the[TVONotificationDelegate notificationError:]
method will be invoked synchronously with an appropriate error. -
A new error
TVOErrorUnsupportedCancelMessageError (31302)
is raised when a "cancel" push notification is provided to[TwilioVoice handleNotification:delegate:]
via[TVONotificationDelegate notificationError:]
. The SDK no longer supports "cancel" push notifications. Failure to register with the new release of the SDK may result in app terminations since "cancel" push notifications will continue to be sent to your application and may not comply with the new PushKit push notification policy. -
If you are specifying a region via the
TwilioVoice.h
region property you must now do so before[TwilioVoice call:params:delegate:]
or[TwilioVoice handleNotification:delegate:]
is called.
Enhancements
- [CLIENT-5594] Added
TVOErrorTokenAuthenticationRejected (51007)
. This error is raised when attempting to perform registration with a token that is invalid.
2.0.7 (September 7, 2018)
- Programmable Voice iOS SDK 2.0.7 [Dynamic Framework], [Static Library], [docs]
Bug Fixes
- [CLIENT-5086] Fixed an issue where registration and unregistration success and failure events were not recorded in Twilio backend.
Size Impact for 2.0.7
Architecture | Compressed Size | Uncompressed Size |
---|---|---|
Universal | 1.8 MB | 3.8 MB |
arm64 | 895 KB | 3.8 MB |
armv7 | 910 KB | 3.8 MB |
2.0.6 (August 15, 2018)
- Programmable Voice iOS SDK 2.0.6 [Dynamic Framework], [Static Library], [docs]
Enhancements
- The libboringssl.a
library is now separated and shipped alongside the static library libTwilioVoice.a
. Add -lboringssl
in the Other Linker Flags to link the SDK properly.
Bug Fixes
- [CLIENT-4971] The call delegate
call:didDisconnectWithError:
of the caller should be called withnil
error instead ofcall:didFailToConnectWithError:
when theTVOCallInvite
is rejected withanswerOnBridge
enabled.
2.0.5 (August 3, 2018)
- Programmable Voice iOS SDK 2.0.5 [Dynamic Framework], [Static Library], [docs]
Bug Fixes
- [CLIENT-4611] Fixed an issue where early hangup did not disconnect the call if
answerOnBridge
is enabled.
2.0.4 (March 26, 2018)
- Programmable Voice iOS SDK 2.0.4 [Dynamic Framework], [Static Library], [docs]
Bug Fixes
- [CLIENT-4426] The SDK will ignore the
AVAudioSessionInterruptionOptionShouldResume
flag and automatically resume Call audio when the interruption ends, as suggested in Apple's Responding to Interruptions guide.
2.0.3 (March 13, 2018)
- Programmable Voice iOS SDK 2.0.3 [Dynamic Framework], [Static Library], [docs]
Bug Fixes
- [CLIENT-4336] Fixed an issue where Call audio doesn't resume after audio interruption. (voice-quickstart-swift #116)
2.0.2 (February 27, 2018)
- Programmable Voice iOS SDK 2.0.2 [Dynamic Framework], [Static Library], [docs]
Enhancements
- API Changes:
TwilioVoice.h
now is the umbrella header and includes all the SDK headers for you.
2.0.1 (January 12, 2018)
- Programmable Voice iOS SDK 2.0.1 [Dynamic Framework], [Static Library], [docs]
Bug Fixes
- [CLIENT-4268] Removed debug assertions in release build. #94
- [CLIENT-4285] Retry enabling the audio device up to 5 times when
TwilioVoice.audioEnabled
is set toYES
.
2.0.0 (December 15, 2017)
- Programmable Voice iOS SDK 2.0.0 [Dynamic Framework], [Static Library], [docs]
2.0.0-beta22 (December 13, 2017)
- Programmable Voice iOS SDK 2.0.0-beta22 [Dynamic Framework], [Static Library], [docs]
Enhancements
- API Changes:
TwilioVoice.startAudio()
andTwilioVoice.stopAudio()
have been removed in favor of a new property calledTwilioVoice.audioEnabled
. This property provides developers with a mechanism to enable or disable the activation of the audio device prior to starting a call or to stop or start the audio device while a call is already in progress. ACall
can now be connected without activating the audio device by settingTwilioVoice.audioEnabled
toNO
and can be enabled during the lifecycle of theCall
by settingTwilioVoice.audioEnabled
toYES
. The default value isYES
. This API change was made to ensure full compatibility with CallKit as well as supporting other use cases where developers may need to disabled the audio device during aCall
. These changes also improve the underlying implementation ofhold
in theTVOCall
object ensuring that callinghold
does not disable the audio device while still ceasing the flow of audio between call parties.TVOCall.delegate
is now marked as readonly.TwilioVoice.configureAVAudioSession()
applies the following settings to theAVAudioSession
. Calling this ensures that theAVAudioSession
will not be modified while connecting to a Call, rather the configuration is configured up front when calling theTwilioVoice.configureAVAudioSession()
method. This ensures that theCall
is compliant with theCallKit
APIs.
NSError *error = nil;
[[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord
mode:AVAudioSessionModeVoiceChat
options:AVAudioSessionCategoryOptionAllowBluetooth | AVAudioSessionCategoryOptionAllowBluetoothA2DP
error:&error];
2.0.0-beta21 (November 29, 2017)
- Programmable Voice iOS SDK 2.0.0-beta21 [Dynamic Framework], [Static Library], [docs]
Enhancements
- API Changes:
- A new method
hold
is added toTVOCall
. Use this method for audio session interruption or CallKit integration. Check out the quickstart for more examples. TVOCall.uuid
is now readonly and nonnull.TVOCall
inherits UUIDs when created fromTVOCallInvite.acceptWithDelegate:
.- Added a variant of
TwilioVoice.call()
which accepts anNSUUID
argument. - The SDK now defers creation of signaling and media resources until a
TVOCallInvite
is accepted or rejected instead of when theTVOCallInvite
is raised viaTVONotificationDelegate
. - The returned
TVOCall
objects ofTwilioVoice.call()
andTVOCallInvite.acceptWithDelegate()
are nownonnull
.
- A new method
2.0.0-beta20 (November 9, 2017)
- Programmable Voice iOS SDK 2.0.0-beta20 [Dynamic Framework], [Static Library], [docs]
Bug Fixes
- [CLIENT-3765] Fixed a bug where
TVOCall
gets stuck when a network handover occurs and its state is stillTVOCallStateConnecting
. - [CLIENT-4101] Fixed a potential crash when the Call is disconnected, especially when trying to make a call when the network connection is lost.
- [CLIENT-4150] Nullability notations updated in
TVOCall
-to
,from
anduuid
are nownullable
. #79
2.0.0-beta19 (October 24, 2017)
- Programmable Voice iOS SDK 2.0.0-beta19 [Dynamic Framework], [Static Library], [docs]
Enhancements
- API Changes:
call:didFailToConnectWithError:
andcall:didDisconnectWithError:
are introduced to theTVOCallDelegate
protocol to replace the originalcallDidDisconnect:
andcall:didFailWithError:
methods. Please seeTVOCallDelegate.h
for more details.- The
sharedInstance
method is removed fromTwilioVoice
. - The
publishMetricsEnabled
property is removed fromTwilioVoice
. Call quality data collection is enabled by default.
Bug Fixes
- [CLIENT-3966] Fixed a bug where the log level of the PJSIP module might not be updated after calling
[TwilioVoice setModule:logLevel:]
. - [CLIENT-4102] Fixed a crash when calling
[TwilioVoice startAudio]
or[TwilioVoice stopAudio]
.
2.0.0-beta18 (October 11, 2017)
- Programmable Voice iOS SDK 2.0.0-beta18 [Dynamic Framework], [Static Library], [docs]
Bug Fixes
- [CLIENT-4092] The
inject_credentials.sh
which was accidentally included in theTwilioVoice.framework
bundle has been removed.
2.0.0-beta17 (October 9, 2017)
- Programmable Voice iOS SDK 2.0.0-beta17 [Dynamic Framework], [Static Library], [docs]
Enhancements
- API Changes:
- The
callInviteCanceled:
method has been removed and now both Call-invite and Call-canceled events will be received via thecallInviteReceived:
callback. - Calling
[TwilioVoice call:params:delegate]
without validaccessToken
,params
, ordelegate
arguments results in anNSInvalidArgumentException
being raised. Thedelegate
property is now marked explicitly asnonnull
. - The Voice SDK now lets you select the specific Twilio data center used when your Call connects to Twilio. Use the
region
property ofTwilioVoice
to select the best location for your mobile client. The details of this feature are covered in [Regions]. - Possible error codes and descriptions are now available in the
TVOError.h
header.
- The
Bug Fixes
- [CLIENT-4064]
Invalid Grants (20106)
error code will be returned if the access token does not containvoice
grant when calling[TwilioVoice registerWithAccessToken:deviceToken:completion:]
or[TwilioVoice call:params:delegate:]
. - [CLIENT-3967] Fixed a bug where
call:didFailWithError:
callback is received with a generic error instead ofcallDidDisconnect:
when trying to hang up a Call that is still inTVOCallStateConnecting
state. - [CLIENT-3820] Fixed a bug where
TVOCall
still gets connected when calling[TVOCall disconnect]
while the Call is in theTVOCallStateConnecting
state.
Known Issues
- A development script
inject_credentials.sh
was accidentally included in the framework bundle and will cause a code signing issue when uploading the application to iTunes Connect. We are working on the fix and will release another beta soon. (voice-quickstart-swift #72)
2.0.0-beta16 (September 21, 2017)
- Programmable Voice iOS SDK 2.0.0-beta16 [Dynamic Framework], [Static Library], [docs]
Enhancements
- API Changes:
startAudioDevice
andstopAudioDevice
are nowstartAudio
andstopAudio
. Use these CallKit integration methods in theprovider:didActivateAudioSession:
orprovider:didDeactivateAudioSession:
callbacks.- The
audioSessionDeactivated
method for CallKit integration has been removed and the functionality is consolidated into thestopAudio
method. - The
delegate
parameter of the[TwilioVoice handleNotification:delegate:]
method is now non-null. An exception will be thrown if called with an invaliddelegate
.
- The SDK is now packaged as a static library with headers, in addition to a dynamic framework.
Bug Fixes
- [CLIENT-4045] Fixed a crash when the SDK tries to perform JSON-serialization on call quality data.
- [CLIENT-3728] The
init
methods ofTwilioVoice
,TVOCallInvite
andTVOCall
are explicitly marked as unavailable and now throw exceptions when called. - [CLIENT-3726] Fixed a crash when
[TwilioVoice handleNotification:delegate:]
is called with non-NSDictionary or emptypayload
argument.
2.0.0-beta15 (August 31, 2017)
Bug Fixes
- [CLIENT-3695] Resolved internal retain cycles in classes which produce call quality metrics.
- [CLIENT-3885] Internal resources of the SIP Client were not freed when the number of active Calls and Invites reached zero.
- [CLIENT-3970] If a
TVOCallInvite
is rejected with an activeTVOCall
, disconnect events from the remote party are not received on the Call. - [CLIENT-3941] If the first outgoing Call fails due to no network connectivity then subsequent Calls fail as well.
2.0.0-beta14 (August 15, 2017)
Enhancements
- [CLIENT-3850] The SDK is now able to have multiple calls simultaneously.
Bug Fixes
- [CLIENT-3853] Improved error handling for registration operations.
- [CLIENT-3884] Registration callbacks are now raised on the main thread.
- [CLIENT-3954] Fixed a crash when calling
TVOCall.disconnect()
to hang up the call.
2.0.0-beta13 (July 20, 2017)
Enhancements
- [CLIENT-3838] Reduced the size of the SDK by removing a dependency which was used for registration.
Bug Fixes
- [CLIENT-3674, 3772] Resolved memory corruption crashes which could occur after registering.
- [CLIENT-3713] Static boost threads are no longer created when loading the SDK. The Poco threadpool which was created after registering no longer exists.
- [CLIENT-3706] Resolved memory leaks in BoringSSL which occured while registering.
- [CLIENT-3814] Close the signaling connection when the active Call is disconnected.
2.0.0-beta12 (July 11, 2017)
Enhancements
- API Changes:
TVOCallInviteStateCancelled
is nowTVOCallInviteStateCanceled
.TVONotificationDelegate
methodcallInviteCancelled:
is nowcallInviteCanceled:
.TVOCall.callSid
is nowTVOCall.sid
.
Bug Fixes
- [CLIENT-3786] Fixed a bug where subsequent calls might lose audio.
- [CLIENT-3684] Fixed a crash when trying to reject a call invite without network.
- [CLIENT-3554] Fixed a bug where making a call right after calling
TVOCall.disconnect()
would fail.
Known Issues
- This version of the SDK is impacted by SSL certificate deprecation (Advisory).
2.0.0-beta11 (June 21, 2017)
Enhancements
- API Changes:
- A new method
audioSessionDeactivated
is added to theCallKitIntegration
category ofTwilioVoice
. Use this method on receiving theprovider:didDeactivateAudioSession:
callback from CallKit before making or accepting subsequent calls to ensure call audio works.
- A new method
Bug Fixes
- [CLIENT-3686] Fixed a bug where subsequent calls lose audio if the application calls
TVOCall.disconnect()
on receiving theAVAudioSessionInterruptionNotification
notification. - [CLIENT-3717] Fixed a bug where DTMF digits are not sent properly.
Known Issues
- This version of the SDK is impacted by SSL certificate deprecation (Advisory).
2.0.0-beta10 (June 5, 2017)
Bug Fixes
- [CLIENT-3647] Fixed a crash when the SDK is trying to parse the SIP error code and description.
- [CLIENT-3679] Fixed a memory leak by improving the use of
NSURLSession
. - [CLIENT-3672]
TwilioVoiceClient.h
is no longer required and is removed from the framework headers. - [CLIENT-3626]
uuid
is added to thedebugDescription
method ofTVOCallInvite
andTVOCall
.
Known Issues
- This version of the SDK is impacted by SSL certificate deprecation (Advisory).
2.0.0-beta9 (May 11, 2017)
Bug Fixes
- [CLIENT-3611] Added DTMF tone local playback when
TVOCall.sendDigits
is called. - [CLIENT-3617] We now destroy the media session right after
TVOCall.disconnect
is called. This is for faster teardown of audio after a call. - [CLIENT-3634] Added more granular error codes and descriptions for call failures resulting from invalid access tokens.
Known Issues
- This version of the SDK is impacted by SSL certificate deprecation (Advisory).
2.0.0-beta8 (April 12, 2017)
Enhancements
- API Changes:
- The
VoiceClient
class is now calledTwilioVoice
. - The framework name is now
TwilioVoice.framework
. Please update yourPodfile
and codes to import the SDK properly.
- The
Bug Fixes
- [CLIENT-3528] Fixed a bug where audio does not work for CallKit.
Known Issues
- This version of the SDK is impacted by SSL certificate deprecation (Advisory).
2.0.0-beta7 (March 17, 2017)
Bug Fixes
- [CLIENT-3441] Fixed a bug where audio does not resume after network handover.
- [CLIENT-3495] Fixed a bug where inconsistent UUIDs of the
TVOCallInvite
object and theTVOCall
object could cause failure when disconnecting CallKit incoming calls. - [CLIENT-3513] Fixed a bug where the SDK does not get disconnected after rejecting a call-invite from a third party during an active call.
Known Issues
- This version of the SDK is impacted by SSL certificate deprecation (Advisory).
2.0.0-beta6 (February 16, 2017)
Enhancements
- Introduced a new object model:
- Consolidated
TVOutgoingCall
andTVOIncomingCall
into a single class -TVOCall
, and its delegateTVOCallDelegate
. - Introduced the
TVOCallInvite
class for applications to answer or reject incoming calls. - Enabled Secure Real Time Protocol (SRTP). Both signaling and media channels are encrypted now.
Bug Fixes
- [CLIENT-3435] Fixed a crash in
TVORTCMonitor.insertSample()
. - [CLIENT-3134] Fixed a bug that prevented the SDK from working on WiFi networks when cellular data connection is turned off/disabled.
- [CLIENT-3409] Added more informative error messages to be returned when VoIP Push registration fails.
Known Issues
- This version of the SDK is impacted by SSL certificate deprecation (Advisory).
- Calls will lose audio when network handover happens.
2.0.0-beta5 (November 30, 2016)
Enhancements
- Added a network reachability check and resulting adjustments every time the app comes into foreground.
- Trying to place or receive a call when there is no network connectivity will now result in
outgoingCall:didFailWithError:
orincomingCall:didFailWithError:
callbacks, respectively. - Trying to place or receive a call when there is already an established call present will now result in
outgoingCall:didFailWithError:
orincomingCall:didFailWithError:
callbacks, respectively. - Bitcode is now supported for app submission.
Bug Fixes
- [CLIENT-3125] Fixed an issue with CallKit support where only the first CallKit call had audio.
- [CLIENT-3245] Fixed an issue where the local microphone was not enabled on iOS 9 devices.
Known Issues
- This version of the SDK is impacted by SSL certificate deprecation (Advisory).
- iOS 10.2 beta2. When using CallKit, the SDK may fail to accept the second and subsequent incoming calls on iOS 10.2 beta2.
- Network handover. If during an ongoing call the WiFi connection is switched from one network to another, and the LTE network is not available, the audio connection will be cut and will not re-establish.
2.0.0-beta4 (October 20, 2016)
Enhancements
- Added support for CallKit:
- Use the following methods to inform the SDK of CallKit events:
configureAudioSession
- use this method to set up theAVAudioSession
with desired configuration before letting the CallKit framework activate the audio sessionstartAudioDevice
- use this method to signal the SDK to start audio I/O units when receiving the audio activation callback of CallKit'sCXProviderDelegate
stopAudioDevice
- use this method to signal the SDK to stop audio I/O units when receiving deactivation or reset callbacks of CallKit'sCXProviderDelegate
- Use the
uuid
properties of theTVOIncomingCall
andTVOOutgoingCall
to reference your calls within CallKit.
- Use the following methods to inform the SDK of CallKit events:
- Added two new Quickstart apps - for Objective-C and Swift (deprecated as of 2020) - to demonstrate the use of CallKit features.
- Added sample code in the Quickstart apps for handling a new incoming call while an existing call is already in progress.
- The
version
method ofVoiceClient
is now an instance method to avoid a clash with theversion
method ofNSObject
. - Changed the possible states of the
TVOOutgoingCall
. Only the connecting, connected, and disconnected states remain. - Removed
IsConnecting
callback of theTVOIncomingCallDelegate
and theTVOOutgoingCallDelegate
. The creation ofTVOOutgoingCall
and the existence ofTVOIncomingCall
imply that the calls are connecting.
Bug Fixes
- [CLIENT-3069] Fixed an issue where the
logLevel
method did not return the correct value after the log level was set. - [CLIENT-3110] Fixed a crash when audio interruption (PSTN call, Siri) occurs during active calls.
Known Issues
- This version of the SDK is impacted by SSL certificate deprecation (Advisory).
- Network handover. If during an ongoing call the WiFi connection is switched from one network to another, and the LTE network is not available, the audio connection will be cut and will not re-establish.
2.0.0-beta3 (October 11, 2016)
Enhancements
- Updated the unused architectures removal script so as to avoid issues when publishing to the App Store. If you're including
TwilioVoiceClient.Framework
in your project manually, you'll need to remove the simulator binaries from the embedded framework before publishing to the App Store. Navigate to your target's Build Phases screen and create a new "Run Script Phase". Paste the following command in the script text field:
/bin/bash "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/TwilioVoiceClient.framework/remove_archs"
- Removed
accountSid
property from theTVOIncomingCall
class - Added
TVOIncomingCallStateCancelled
state to theTVOIncomingCall
class - Renamed
register:deviceToken:completion
toregisterWithAccessToken:deviceToken:completion
to avoid conflict with C language reserved keywordregister
- Renamed
unregister:deviceToken:completion
tounregisterWithAccessToken:deviceToken:completion
to avoid conflict with C language reserved keywordregister
- Switched to BoringSSL library as our SSL implementation
- Added additional logic for IPv6 support that attempts to connect to all resolved internet addresses and uses the first network interface that successfully connects
Bug Fixes
- All delegate callbacks are now dispatched on the main queue
- The SDK no longer starts the audio device when rejecting a call
- Fixed a crash on regaining network access after having launched SDK without network access
Known Issues
- This version of the SDK is impacted by SSL certificate deprecation (Advisory).
- Network handover. If during an ongoing call the WiFi connection is switched from one network to another, and the LTE network is not available, the audio connection will be cut and will not re-establish.
2.0.0-beta2 (September 27, 2016)
Bug Fixes
- Supports IPv6-only networks on iOS 10
Known Issues
- This version of the SDK is impacted by SSL certificate deprecation (Advisory).
2.0.0-beta1 (September 16, 2016)
Enhancements
- Supports iOS 10
- Uses Apple VoIP Services push notifications for signaling incoming calls
- Uses Twilio Access Tokens for authentication/authorization
Bug Fixes
- n/a
Known Issues
- This version of the SDK is impacted by SSL certificate deprecation (Advisory).
Need some help?
We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.