Tutorial — your first chat app
1. Create project
shell
npx @react-native-community/cli@latest init MyChatAppcd MyChatApp2. Install
shell
npm install @realtimexsco/live-chat-react-native# + every chat peer from "Installation step by step → 1"npm install @videosdk.live/react-native-sdk@^0.6.0 @videosdk.live/react-native-incallmanager@^0.1.3npm install @notifee/react-native react-native-callkeep react-native-voip-push-notification # optionalcd ios && pod install && cd ..3. File structure
code
MyChatApp/├── index.js ← VideoSDK register + push handlers├── App.tsx ← providers + navigation├── babel.config.js ← react-native-worklets/plugin├── firebase.json ← optional iOS foreground option├── android/│ ├── build.gradle ← google-services classpath│ └── app/│ ├── build.gradle ← google-services plugin│ ├── google-services.json│ └── src/main/AndroidManifest.xml ← supportsPictureInPicture├── ios/│ ├── Podfile ← setup_permissions + Broadcast target│ ├── MyChatApp/│ │ ├── AppDelegate.swift ← FirebaseApp.configure()│ │ ├── Info.plist ← usage strings, background modes, RTC keys│ │ ├── MyChatApp.entitlements ← aps-environment, App Group│ │ └── GoogleService-Info.plist│ └── MyChatAppBroadcast/ ← screen share (optional)└── src/ ├── configs/chat.config.ts └── screens/ChatScreen.tsx4. Native files
Apply every file in the Native file cheat sheet, then cd ios && pod install.
5. babel.config.js
javascript
module.exports = { presets: ['module:@react-native/babel-preset'], plugins: ['react-native-worklets/plugin'],};6. src/configs/chat.config.ts
typescript
import type {ConfigureChatOptions} from '@realtimexsco/live-chat-react-native'; let hostToken = ''; // replace with your auth storeexport const setHostToken = (token: string) => { hostToken = token;}; export const chatConfig: ConfigureChatOptions = { apiUrl: 'https://realtimex.softwareco.com/api/v1', socketUrl: 'https://realtimex.softwareco.com', clientId: 'YOUR_CLIENT_ID', accessToken: () => hostToken, callUri: 'https://realtimex.softwareco.com/api/v2',};7. index.js
The "host without its own push handlers" version from App entry — index.js.
8. src/screens/ChatScreen.tsx
tsx
import React from 'react';import {ChatNavigator, ChatProvider} from '@realtimexsco/live-chat-react-native';import {chatConfig} from '../configs/chat.config'; export default function ChatScreen() { return ( <ChatProvider config={chatConfig}> <ChatNavigator /> </ChatProvider> );}9. App.tsx
tsx
import React from 'react';import ChatScreen from './src/screens/ChatScreen'; export default function App() { return <ChatScreen />;}ChatProvider supplies safe area, gesture root and toast; ChatNavigator supplies its own NavigationContainer. When the app grows its own navigator, switch to Nested inside your own navigator.
10. Run
shell
npm run startnpm run ios # device recommended for calls / PiP / pushnpm run android