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. Find the latest release in Sync JavaScript Changelog. To include it on your web page, use script
tags like the following:
<script src="https://media.twiliocdn.com/sdk/js/sync/v1.0/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 { implementation 'com.twilio:sync-android:1.0.0' }
iOS SDK
The iOS SDK is distributed as a CocoaPod using Twilio's 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:
use_frameworks! platform :iOS, '11.0' target 'MyTarget' do pod 'TwilioSyncClient', '~> 1.0.0' 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"
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 libc++.tbd
as a dependency to your target if it is not already there.
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 theEmbed 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"
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.