Skip to main content

Setup guide for mobile app

Installation and setup

Prerequisites

To learn more about the most up-to-date instructions, please refer to the guide available here.

Clone the repository

git clone git@github.com:chatwoot/chatwoot-mobile-app.git

Install dependencies

pnpm install

Install Expo CLI

pnpm install -g expo-cli

Environment Variables

cp .env.example .env
NameDescriptionDefault ValueRequired
EXPO_PUBLIC_CHATWOOT_WEBSITE_TOKENWeb widget token for in-app support-No
EXPO_PUBLIC_CHATWOOT_BASE_URLSelf-hosted installation URLhttps://app.chatwoot.comYes
EXPO_PUBLIC_JUNE_SDK_KEYJune analytics SDK key-No
EXPO_PUBLIC_MINIMUM_CHATWOOT_VERSIONMinimum supported Chatwoot version-Yes
EXPO_PUBLIC_SENTRY_DSNSentry DSN URL for error reporting-No
EXPO_PUBLIC_PROJECT_IDExpo project identifier-Yes
EXPO_PUBLIC_APP_SLUGApplication slug for Expo-Yes
EXPO_PUBLIC_SENTRY_PROJECT_NAMEProject name in Sentry-No
EXPO_PUBLIC_SENTRY_ORG_NAMEOrganization name in Sentry-No
EXPO_PUBLIC_IOS_GOOGLE_SERVICES_FILEPath to iOS Google Services config file-No
EXPO_PUBLIC_ANDROID_GOOGLE_SERVICES_FILEPath to Android Google Services config file-No
EXPO_APPLE_IDApple Developer account ID-No
EXPO_APPLE_TEAM_IDApple Developer team ID-No
EXPO_STORYBOOK_ENABLEDEnable/disable StorybookfalseNo

Generate the native code

pnpm generate

Generates native Android and iOS directories using Prebuild.

Note: You need to run pre-build if you add a new native dependency to your project or change the project configuration in Expo app config (app.config.ts).

How to run the app

Connect your iPhone/Android device and run the following command to install the app on your device.

## iOS
pnpm run:ios

## Android
pnpm run:android

How to install the packages

Please always to install the packages using the command npx expo install package-name instead of pnpm install package-name.

This is crucial for native dependencies because the expo will automatically install the correct compatible version while pnpm/yarn/npm will install the latest version which may or may not be compatible.

Push notification

If you are using the community edition of Chatwoot, you would now be able use the Official mobile app with push notifications without any additional configuration. Please refer to the documentation for more details.

Build & Submit using EAS

We use Expo Application Services (EAS) for building, deploying, and submitting the app to app stores. EAS Build and Submit is available to anyone with an Expo account, regardless of whether you pay for EAS or use our Free plan. You can sign up at Expo EAS.

Build the app

## iOS
pnpm run build:ios:local

## Android
pnpm run build:android:local

Submit the app

## iOS
pnpm submit:ios

## Android
pnpm submit:android

When you run the above command, you will be prompted to provide a path to a local app binary file. Please select the file that you built in the previous step. It is .ipa for iOS and .aab for Android.

It may take a while to complete the submission process. You will see the status of the submission on your terminal.