メニュー

Expand
ページを評価:

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 the following <script> tag:

<script src="https://media.twiliocdn.com/sdk/js/conversations/releases/1.0.0/twilio-conversations.min.js"
        integrity="sha256-wwGP7TgNRaTpRZj6r7CM/ZPMa/mMj44/QRLQNnQMJjU="
        crossorigin="anonymous"></script>

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 SHA-256 is:

25c2891017e4384a86869913069212946d5f4748a58c88879ec09acad79b7721

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

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.

CocoaPod

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', '~> 1.3'
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 > Swift Packages > Add Package Dependency....
  3. Enter https://github.com/twilio/conversations-ios into the search field in the Choose Package Repository dialog, then click Next.
  4. Make your versioning choice and click Next.
  5. Add the package to one of your targets and click Finish.

Direct download

We also offer the iOS SDK frameworks for 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. Confirm the download’s SHA-0256: 9173516f6158c2a4009956cc1f680cc99bb4c3f3160ac52fd513023f762bf6f1
  3. Expand the downloaded .zip file and locate the .xcframework file(s) inside the directory created.
  4. 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.
  5. Add libc++.tbd as a dependency to your target if it is not already there.
ページを評価:

ヘルプが必要ですか?

誰しもが一度は考える「コーディングって難しい」。そんな時は、お問い合わせフォームから質問してください。 または、Stack Overflow でTwilioタグのついた情報から欲しいものを探してみましょう。

        
        
        

        フィードバックくださりありがとうございます!

        We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

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

        Thanks for your feedback!

        Refer us and get $10 in 3 simple steps!

        ステップ1

        Get link

        Get a free personal referral link here

        ステップ2:

        Give $10

        Your user signs up and upgrade using link

        ステップ3

        Get $10

        1,250 free SMSes
        OR 1,000 free voice mins
        OR 12,000 chats
        OR more