{"id":4750,"url":"https://github.com/rogchap/react-native-twilio","last_synced_at":"2025-06-30T05:05:32.202Z","repository":{"id":138950138,"uuid":"45961914","full_name":"rogchap/react-native-twilio","owner":"rogchap","description":"A React Native wrapper for the Twilio mobile SDK","archived":false,"fork":false,"pushed_at":"2017-09-04T07:56:41.000Z","size":127360,"stargazers_count":93,"open_issues_count":12,"forks_count":42,"subscribers_count":5,"default_branch":"develop","last_synced_at":"2025-06-29T15:03:54.877Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rogchap.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2015-11-11T05:32:13.000Z","updated_at":"2025-01-30T06:33:39.000Z","dependencies_parsed_at":"2024-04-22T04:54:38.672Z","dependency_job_id":null,"html_url":"https://github.com/rogchap/react-native-twilio","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/rogchap/react-native-twilio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rogchap%2Freact-native-twilio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rogchap%2Freact-native-twilio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rogchap%2Freact-native-twilio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rogchap%2Freact-native-twilio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rogchap","download_url":"https://codeload.github.com/rogchap/react-native-twilio/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rogchap%2Freact-native-twilio/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262714504,"owners_count":23352464,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-01-05T20:17:22.158Z","updated_at":"2025-06-30T05:05:32.173Z","avatar_url":"https://github.com/rogchap.png","language":"Objective-C","funding_links":[],"categories":["Components"],"sub_categories":["Integrations"],"readme":"# A React Native wrapper for the [Twilio](https://www.twilio.com) mobile SDK\n\n[![npm version](https://badge.fury.io/js/react-native-twilio.svg)](https://badge.fury.io/js/react-native-twilio)\n\nThis library implement the superseeded Twilio Client SDK. Twilio has moved to the new Programmable Voice SDK.\n\nRun `npm install react-native-twilio --save` in your project directory\n\n## Installation iOS\n\n1. Open your project in XCode, right click on `Libraries` and click `Add Files to \"Your Project Name\"`\n2. Within `node_modules`, find `react-native-twilio/ios` and add RCTTwilio.xcodeproj to your project.\n3. Add `libRCTTwilio.a` to `Build Phases -\u003e Link Binary With Libraries`\n\n## Installation Android\n\nAdd the lib to `android/settings.gradle`\n\n```\ninclude ':react-native-twilio'\nproject(':react-native-twilio').projectDir = new File(settingsDir,\n  '../node_modules/react-native-twilio/android')\n\n```\n\nAdd the lib dependency to `app/build.gradle`\n\n```\ndependencies {\n    compile fileTree(dir: \"libs\", include: [\"*.jar\"])\n    compile \"com.android.support:appcompat-v7:23.0.1\"\n    ...\n    compile project(':react-native-twilio') // \u003c----\n}\n```\n\nImport the library in your `MainApplication.java`\n\n```\n\nimport android.app.Application;\nimport android.util.Log;\n\nimport com.facebook.react.ReactApplication;\nimport com.facebook.react.ReactInstanceManager;\nimport com.facebook.react.ReactNativeHost;\nimport com.facebook.react.ReactPackage;\nimport com.facebook.react.shell.MainReactPackage;\n\nimport com.rogchap.react.modules.twilio.TwilioPackage; // \u003c----\n\nimport java.util.Arrays;\nimport java.util.List;\n\npublic class MainApplication extends Application implements ReactApplication {\n\n  private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) {\n\n    /**\n     * Returns whether dev mode should be enabled.\n     * This enables e.g. the dev menu.\n     */\n    @Override\n    protected boolean getUseDeveloperSupport() {\n        return BuildConfig.DEBUG;\n    }\n\n    /**\n     * A list of packages used by the app. If the app uses additional views\n     * or modules besides the default ones, add more packages here.\n     */\n    @Override\n    protected List\u003cReactPackage\u003e getPackages() {\n      return Arrays.\u003cReactPackage\u003easList(\n        new MainReactPackage(),\n        new TwilioPackage() // \u003c----\n      );\n    }\n  };\n\n  @Override\n  public ReactNativeHost getReactNativeHost() {\n      return mReactNativeHost;\n  }\n\n}\n\n```\n\nconfigure your `AndroidManifest.xml` file\n\n```\n      \u003cuses-permission android:name=\"android.permission.INTERNET\" /\u003e\n\n      ...\n\n      \u003c!-- Twilio --\u003e\n      \u003cservice android:name=\"com.twilio.client.TwilioClientService\" android:exported=\"false\" android:stopWithTask=\"true\"/\u003e\n      \u003c!-- Twilio --\u003e\n```\n\nFor a full example check [the full working example](RNTwilioExample)\n\n\n## Usage\n\nHave a look at the [Twilio Client SDK](https://www.twilio.com/docs/api/client) for details.\n\n``` javascript\nconst Twilio = require('react-native-twilio');\n\n...\n\ncomponentWillMount() {\n  Twilio.initWithTokenUrl('https://example.com/token');\n  // or \n  Twilio.initWithToken('sometoken');\n  Twilio.addEventListener('deviceReady', this._deviceReady);\n  Twilio.addEventListener('deviceDidStartListening', this._deviceDidStartListening);\n  Twilio.addEventListener('deviceDidStopListening', this._deviceDidStopListening);\n  Twilio.addEventListener('deviceDidReceiveIncoming', this._deviceDidReceiveIncoming);\n  Twilio.addEventListener('connectionDidStartConnecting', this._connectionDidStartConnecting);\n  Twilio.addEventListener('connectionDidConnect', this._connectionDidConnect);\n  Twilio.addEventListener('connectionDidDisconnect', this._connectionDidDisconnect);\n  Twilio.addEventListener('connectionDidFail', this._connectionDidFail);\n}\n\n...\n\nTwilio.connect({To: '+61234567890'});\n  \nTwilio.disconnect();\n\nTwilio.accept();\n\nTwilio.reject();\n\nTwilio.ignore();\n```\n\n## LICENSE\n\n[MIT License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frogchap%2Freact-native-twilio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frogchap%2Freact-native-twilio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frogchap%2Freact-native-twilio/lists"}