@ada-support/react-native-sdk
Version:
The Ada ReactNative is a small framework that is used to embed your Ada Chat bot into your ReactNative application.
38 lines (27 loc) • 2.05 kB
Markdown
# Ada React Native SDK
Go [here](https://developers.ada.cx/reference/add-chat-to-react-native-app) for client-facing docs.
## Prerequisites
You will need to have the below installed in order to run/compile the code
- [Java JDK - Follow Expo's Guide](https://docs.expo.dev/get-started/set-up-your-environment/?mode=development-build&buildEnv=local#install-watchman-and-jdk)
- ** Note: Watchman is used for hot-reloading changes. This appears to break this application. For the Java JDK step, ignore the watchman step **
- [Ruby 3.2.0](https://github.com/rbenv/rbenv)
- XCode - Latest (get this from the App Store)
- If you installed xCode command line tools before xCode you may need to run `sudo xcode-select -s /Applications/Xcode.app/Contents/Developer`
- Android Studio - Latest
- Node 20.x.x
- Ensure you download an iOS and/or an Android simulator in xCode/Android Studio and have them running.
Add the following to your PATH in bash (.profile) or zsh (.zshrc)
```
export ANDROID_HOME="/Users/<your mac user folder here>/Library/Android/sdk"
PATH="$PATH:${ANDROID_HOME}/platform-tools/"
```
## Local Development
1) Open a terminal inside the `sample` folder
2) Run `npm run install-local-package`. This will install all needed modules including our SDK from within your local machine (allowing local development)
3) If you want to run Android type `npm run android` or if you want to run iOS type `npm run ios`
NOTE: If you are using a production AI Agent - ensure you add `http://localhost:8081` to your approved domains for it to allow the page to render.
## Architecture
See the [Embed README](https://github.com/AdaSupport/embed-2?tab=readme-ov-file#architecture) for information about architecture.
# Deploying to production
1. Update the version number in the package.json file by incrementing the version value by 1 on the least significant value (eg. if version is 0.0.1, update it to 0.0.2)
2. Get your PR reviewed and then squash and merge it to `master`. Merging your PR will automatically trigger the deploy to npm