Menu

Expand
Rate this page:

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.

Want to see the JS Conversations SDK in action? Check our Conversations React Demo App! The app demonstrates a basic conversations client application with the ability to create and join conversations, add other participants into the conversations, and exchange messages.

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:

9f16e761aad94c1df57005e901425c5beb75750d229a3a1331940f2267400455

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:5.1.1'
}

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
  }
  ...
}

Want to see the Android Conversations SDK in action? Check our Conversations Kotlin Demo App! The app demonstrates a basic conversations client application with the ability to create and join conversations, add other participants into the conversations, and exchange messages.

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.

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', '~> 3.1'
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
  1. Open your project in Xcode.
  2. Select File > Add Packages....
  3. Enter https://github.com/twilio/conversations-ios into the search field.
  4. 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:

  1. Download the Conversations Client framework from the Twilio CDN.
  2. Download the Conversations Client dependencies from Twilio CDN: TwilioTwilscok, TwilioStateMachine, and TwilioCommonLib
  3. Confirm the download’s SHA-256:
    • TwilioConversationsClient 5a0c42f098d897d350e01869888b77561d4ae20e31d055879580e6300b583b0e
    • TwilioTwilsock 9291bfd26e8fe0bd08c90ddfc634b2a0ea7046a1fe8646a9adb1d4172339d69e
    • TwilioStateMachine 0ccb1f1619038c44347db004ade67274da96fd4f473913b4d24df13c430e3576
    • TwilioCommonLib 4a5423f84266a93529e03dde46a15368178e2de415e57a40ffe7b7f0c4954f55
  4. Expand the downloaded .zip files and locate the .xcframework file(s) inside the directories created.
  5. 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 a Reason: image not found error during compilation.
  6. Add libc++.tbd as a dependency to your target if it is not already there.

Want to see the iOS Conversations SDK in action? Check our Conversations Swift Demo App! The app demonstrates a basic conversations client application with the ability to create and join conversations, add other participants into the conversations, and exchange messages.

Rate this page:

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.

Thank you for your feedback!

Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

Sending your feedback...
🎉 Thank you for your feedback!
Something went wrong. Please try again.

Thanks for your feedback!

thanks-feedback-gif