This guide will help you set up the Ada React Native SDK in your app. The process involves three main steps:
AdaEmbedView component.Follow the instructions below to install the SDK and start integrating Ada into your app!
The Ada React Native SDK is based on react-native-webview. Before using the SDK, you must do the following:
allowUniversalAccessFromFileURLs from the later versions of this module.http://localhost:8081/ to your Approved Domains. Without doing this the bot will be blocked by the Content Security Policy.Once you’ve configured react-native-webview, simply install the Ada React Native SDK via NPM.
npm install --save @ada-support/react-native-sdkyarn add @ada-support/react-native-sdkrequire_relative '../node_modules/@ada-support/react-native-sdk/react_native_pods'
use_ada!()
pod install in your app to install the required native modules.Once you have installed the Ada React Native SDK, you’re ready to use it in your app! Simply import the AdaEmbedView component, then render it. Note that you must pass a valid handle for the Chat window to work.
Some functionality in the Ada Chat bot will not work unless permissions are explicitly given.
For iOS, specify the permissions in your ios/[project]/Info.plist file.
For Android, add permissions in AndroidManifest.xml.