Sync SDK ダウンロード
TwilioはiOSやAndroidアプリケーションと同様、ブラウザー・ベースのWebアプリケーション向けのクライアントSDKも提供しています。
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>
これにより、Twilio.Sync
名前空間が、JavaScript アプリケーションのウィンドウスコープで使用できるようになります。
始めるにあたって、アプリケーションに対してトークンを準備することが必要です。 トークン管理の詳細情報については、Syncアプリケーションの安全性を高めるを参照するか、クイックスタートをご覧いただき、基本的な例からスタートしてください。
サポートされるブラウザー
下記ブラウザーのメジャーバージョンをサポートしています:
- Chrome
- Firefox
- Internet Explorer
- Microsoft Edge
- Safari
Android SDK
Android SDKは直接ダウンロードを行うか、またはGradleバンドルファイルで参照することで参照できます。 プロジェクトはBintrayにデプロイされています。
Gradleを使用している場合、下記のStanzaフラグメントで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.
CocoaPod
依存関係をCocoapodsで管理する場合、下記をPodfileに追加し、MyTargetを適切に変更してください:
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.
直接統合
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.
.frameworkファイルをプロジェクトにドラッグし、プロジェクトのターゲット設定のEmbedded Binaries
セクションにドロップされていることを確認し、"Copy items if needed"プロンプトが表示されたらそれを選択します。 frameworkファイルがターゲットのEmbedded Binaries
に表示されない場合、コンパイル時に "Reason: image not found" エラーが表示されます。
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:
- ターゲットの設定を開く
- 選択
Build Phases
- 新規
Run Script
フェイズを追加し、それをEmbed Frameworks
ステップの下に(自動的に移動しない場合は)移動します。 - 実行するコマンドを設定します:
bash "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/TwilioSyncClient.framework/remove_archs"
ヘルプが必要ですか?
誰しもが一度は考える「コーディングって難しい」。そんな時は、お問い合わせフォームから質問してください。 または、Stack Overflow でTwilioタグのついた情報から欲しいものを探してみましょう。