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:

7100398c71adcfeb28d598abb574cc755889455cccb6e2b5bc5e6425561f5974

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

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', '~> 4.0'
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 98985d967aeaa1cb1fbe26562e478e63aba62fce0afd22f73803d7ad1892c915
    • TwilioTwilsock 910f00969a73f3c753ea2cf0babee420ccf811604154a59ed031ceadd444c715
    • TwilioStateMachine 4c528088516081829a03b68bc46dec909aa6dc0d2792f4bf75cc02915ca808a9
    • TwilioCommonLib ec90e2cf021336d5a8b2df2ac0dc1d788a98b22a71ba6556e01515a7ff87a33e
  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