Skip to content

Latest commit

 

History

History
86 lines (76 loc) · 3.28 KB

File metadata and controls

86 lines (76 loc) · 3.28 KB

CometChat

React Native Sample App by CometChat

This is a reference application showcasing the integration of CometChat's React Native UI Kit in React Native. It offers developers practical examples for incorporating real-time messaging, as well as voice and video calling functionalities, into their React Native-based applications.

React Native: iOS

React Native: Android

Prerequisites

Installation

  1. Clone the repository:

    • Using HTTPS
      git clone https://github.com/cometchat/cometchat-sample-app-react-native.git
      
  2. Navigate to the cloned directory:

    cd cometchat-sample-app-react-native
    
  3. Install dependencies:

    npm install
    
  4. For iOS, install dependencies after navigating to ios:

      cd ios
      pod install
  5. Enter your CometChat App ID, Region, and Auth Key in the AppConstants.ts file:

    export const AppConstants = {
    APP_ID: 'xxxxxxxxxxxxx', // Enter your App ID
    REGION: 'xx', // Enter your App Region
    AUTH_KEY: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', // Enter your App Auth Key
    }

  6. If your app is created before August 12th, 2024 then change the sample data URL to https://assets.cometchat.io/sampleapp/v1/sampledata.json in the src/components/login/Login.tsx file:

    React.useEffect(() => {
    fetch("https://assets.cometchat.io/sampleapp/sampledata.json")
    .then((response) => {

  7. Run the app on a device or emulator from the repo root.

    npm start
    npm run android
    npm run ios

Help and Support

For issues running the project or integrating with our UI Kits, consult our documentation or create a support ticket or seek real-time support via the CometChat Dashboard.