sendbird-uikit-react-native

React-Native based UI kit based on sendbird javascript SDK
Introduction
Sendbird UIKit for React-Native is a development kit with an user interface that enables an easy and fast integration of standard chat features into new or existing client apps.
This mono-repository the UIKit source code is consists as explained below.
More about Sendbird UIKit for React-Native
Find out more about Sendbird UIKit for React-Native at UIKit for React Native doc.
If you need any help in resolving any issues or have questions, visit our community.
Requirements
- Nodejs 18 or newer
- yarn v1
- Watchman
- JDK 17 or newer
- XCode
- Android Studio
⚑ More details, please see https://reactnative.dev/docs/environment-setup
⚑ we strongly recommend installing yarn using corepack
Build with Claude Code or Codex
Two Sendbird plugins for Claude Code and Codex help you add this SDK to your React Native app:
- The Sendbird Client Plugin writes setup and feature code from verified Sendbird documentation and the Sendbird SDK you have installed.
- The Sendbird CLI plugin signs you in to Sendbird and manages your apps, users, and channels with the Sendbird CLI. The client plugin can take the App ID from the app you choose there.
The CLI plugin needs Node.js 22.23.4 or a later 22.x release, or 24.22.1 or a later 24.x release. Its setup installs the Sendbird CLI with npm if it is missing.
In Claude Code:
claude plugin marketplace add sendbird/sendbird-plugins
claude plugin install sendbird-client@sendbird
claude plugin install sendbird-cli@sendbird
Start a new session, run /sendbird-cli:sendbird-setup to sign in and choose your app, and then run /sendbird-client:setup --product uikit in your project.
In Codex:
codex plugin marketplace add sendbird/sendbird-plugins
codex plugin add sendbird-client@sendbird
codex plugin add sendbird-cli@sendbird
Start a new session. When Codex shows “Hooks need review”, choose Review hooks and press t to trust the client plugin’s hooks. Then call $sendbird-cli:sendbird-setup to sign in and choose your app, and then call $sendbird-client:setup --product uikit in your project.
See the Client plugin guide and the CLI plugin guide for setup details and example requests.
The client plugin runs local shell scripts as hooks. Review What runs on your machine before installing.
Try the sample app
We are using sample app for development, you can check the sample app here and also check the UI components via storybook in the sample app.
Installation
Every script should be run on the root of the project.
Install node modules
yarn install
Linking native modules of sample app
yarn sample:pod-install
Running sample app
yarn sample:android
yarn sample:ios
Sample app using your data
Create a file to sample/src/env.ts and write the code below to the file you created.
export const APP_ID = '2D7B4CDB-932F-4082-9B09-A1153792DC8D';
If you would like to try the sample app specifically fit to your usage, you can do so by replacing the default sample app ID with yours, which you can obtain by creating your Sendbird application from the dashboard.
Note Update Chat SDK version of sample app
Edit package.json and change the version of resolutions > @sendbird/chat to the version you want to use.
Trouble shooting
- Could not connect to development server on Android device
- Run
adb reverse tcp:8081 tcp:8081.
- Unable to resolve module
../version from packages/uikit-react-native/src/containers/SendbirdUIKitContainer.tsx
- Run
yarn workspace @sendbird/uikit-react-native generate-version on the root of the project.
concurrently 'yarn start' 'react-native run-android' does not working expected
- Run
yarn start and npx react-native run-android separately on the sample directory.
Development
We tried development on macOS / Linux systems. You might encounter problems in running sample or scripts like yarn build in Windows machines.
Creating a new key function files
Run the script and enter the key function name as a lower camel case like groupChannel, and then you can see the auto generated files in the /packages/uikit-react-native/src/domain
yarn workspace @sendbird/uikit-react-native run create-domain
Managing repository
Note
We are using yarn workspaces and lerna to maintain this monorepo
Patch package
If you need to patch some packages for the sample to work using patch-package
npx patch-package package-name > mark as comment yarn-path in .yarnrc file
- OR
./node_modules/.bin/patch-package package-name > just run
Package dependencies
See yarn workspace
# Add dependency to specific workspace package
yarn workspace @sendbird/package add package-name
# Remove dependency from specific workspace package
yarn workspace @sendbird/package remove package-name
# Add dependency to root
yarn -W add package-name
Warning You should better install to root if you’re trying to install native view modules.
Sometimes native view module in the workspace is not hoisted, and it leads to Tried to register two views error on the sample app.
Bump version
See lerna version
lerna version {major|minor|patch} [--no-git-tag-version] [--no-private]
# or
yarn bump:{major|minor|patch}
Publish
See lerna publish
Scripts
Build
yarn build
Test
# Unit test
yarn test
# Build test
yarn test:build
Lint and Prettier
# Check formatting
yarn lint
# Fix formatting
yarn fix
评论