Twilio Conversations Client SDKs
Twilio provides client-side Conversations SDKs for browser-based web applications, as well as for native iOS and Android applications.
JavaScript SDK
The latest version of the JavaScript SDK for Conversations is available on Twilio’s CDN. To include it on your web page, simply add a <script>
tag mentioned in the change log section for the version you're interested in.
The Twilio.Conversations
namespace will then be available in the window scope of your JavaScript application.
The JS Conversations SDK is also available from NPM.
Android SDK
The Twilio Conversations Android SDK is distributed as a direct download from Twilio’s CDN. It can also be installed via Maven or directly within a Gradle build file using Maven Central.
Direct download
Download the Twilio Conversations Client library for Android from the Twilio CDN. The download’s SHA-256 is:
655bab9a0c654d46a68cf4435814e2f5fb437454ccb788df4a716a6915d7f6f7
Maven Central
Twilio Conversations is available from Maven Central.
Gradle
To install via Gradle, include the following in your Gradle build file:
allprojects {
repositories {
mavenCentral()
}
}
/**
* Declare dependencies
* @see http://www.gradle.org/docs/current/userguide/userguide_single.html#sec:how_to_declare_your_dependencies
*/
dependencies {
implementation 'com.twilio:conversations-android:4.0.2'
}
Your Android project needs compatibility with Java 8 language features. If you have not already done so, add the following section to the android
module in your build.gradle
file:
android {
...
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
...
}
iOS SDK
The Conversations SDK for iOS is available through the CocoaPods and Swift Package Manager dependency managers, or by direct download.
We do not currently support the Carthage package manager because it does not support binary XCFramework files.
CocoaPods
To install the SDK using CocoaPods, add the following to your Podfile, changing MyTarget
to the name of your target:
source 'https://github.com/CocoaPods/Specs'
target 'MyTarget' do
pod 'TwilioConversationsClient', '~> 2.2'
end
Swift Package Manager
To install the SDK with Swift Package Manager, add the following dependency to your project:
https://github.com/twilio/conversations-ios
- Open your project in Xcode.
- Select File > Add Packages....
- Enter
https://github.com/twilio/conversations-ios
into the search field. - Make your versioning choice and click Add Package.
Direct download
We also offer the iOS SDK as a direct download. There are several steps you’ll need to complete to successfully add Conversations to your project:
- Download the Conversations Client framework from the Twilio CDN.
- Confirm the download’s SHA-256:
e9fb471aeb874236f4e08f54e2d393f8dd01746226e2d9dc9e7e9124de648c03
- Expand the downloaded
.zip
file and locate the.xcframework
file(s) inside the directory created. - Drag the
.xcframework
file(s) into your Xcode project, making sure they are dropped in the Frameworks, Libraries, and Embedded Content section of your project target’s settings. Make sure you select Copy items if needed when prompted. If the framework file(s) do not appear under Frameworks, Libraries, and Embedded Content for your target, you will receive aReason: image not found
error during compilation. - Add
libc++.tbd
as a dependency to your target if it is not already there.
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.