Sync SDK Download - Twilio
Register for SIGNAL by 8/31 for $250 off. Register now.

Sync SDK Download

Twilio provides client-side SDKs for browser-based web applications as well as native iOS and Android applications.

JavaScript SDK

The latest version of the JavaScript SDK for Sync is made available on Twilio's CDN. To include it on your web page, use script tags like the following:

<script src="https://media.twiliocdn.com/sdk/js/sync/v0.6/twilio-sync.min.js"></script>

The Twilio.Sync namespace should then be available in the window scope of your JavaScript application.

You'll need to provision a token to your application to get started. See Securing your Sync App for more information on token management or look at one of our quickstarts to get started from a basic example.

Supported browsers

We support the latest major versions of:

  • Chrome
  • Firefox
  • Internet Explorer
  • Microsoft Edge
  • Safari

Android SDK

The Android SDK is distributed as a direct download or can be referenced in your Gradle build file. The project is deployed on Bintray.

If you're using gradle, the following stanza fragments will get you set up with Sync.

allprojects {
    repositories {
        maven {
            url "https://twilio.bintray.com/releases"
        }
    }
}

dependencies {
    compile 'com.twilio:sync-android:0.6.0'
}

iOS SDK

The iOS SDK is distributed as a CocoaPod using Twilio's beta CocoaPods source (preferred) or can be installed as a direct download.

CocoaPods

If you manage your dependencies with Cocoapods, add the following to your Podfile, changing MyTarget as appropriate:

source 'https://github.com/twilio/cocoapod-specs'

target 'MyTarget' do
  pod 'TwilioSyncClient', '~> 0.6.1'
end

Carthage Integration

We support integration using Carthage binary frameworks. You can add Sync for iOS by adding the following line to your Cartfile:

github "twilio/twilio-sync-ios"

If you would like to integrate the optional Access Manager helper to manage your access token lifecycle as well, also add:

github "twilio/twilio-accessmanager-ios"

Then run carthage bootstrap (or carthage update if you are updating your SDKs.)

The .framework file(s) will be downloaded to the Carthage/Build/iOS directory. The final step is to complete integration below.

Direct Integration

We also offer the frameworks for direct download if your project is not using CocoaPods. There are several steps you'll need to complete to successfully add Sync to your project:

Upon expanding the .tar.gz file, you will find the .framework file(s) inside the directory created. The final step is to complete integration below.

Completing Framework Integration

These steps are done for you if you are using CocoaPods, but are required if using either Carthage or Direct integration.

Drag the .framework file(s) into your project, making sure they are dropped in the Embedded Binaries section of your project target's settings, selecting 'Copy items if needed' when prompted. If the framework files do not appear in the Embedded Binaries for your target, you will receive a "Reason: image not found" error during compilation.

On that same page, in the Linked Frameworks section, please also add libstdc++.tbd as a dependency to your target.

Our frameworks include both device and simulator versions of the SDK to ease integration at development time. The AppStore only supports device symbols at submission time, so you must remove the simulator symbols at export time, or you will receive an "Unsupported Architectures" error during app submission. We include a script to help with this inside the framework which your project can use during packaging:

  • Open your target's settings
  • Select Build Phases
  • Add a new Run Script phase, move it to below the Embed Frameworks step if it is not added there automatically
  • Set the command to run to: bash "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/TwilioSyncClient.framework/remove_archs"

Please note - you will need to repeat this to add a remove_archs step for Twilio AccessManager if you are using it in your project as well.

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 browsing the Twilio tag on Stack Overflow.