You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: contributing-guide/mobile-app/setup-guide.mdx
+2-234Lines changed: 2 additions & 234 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -115,241 +115,9 @@ pnpm install package-name
115
115
116
116
## Push notifications
117
117
118
-
Chatwoot supports mobile push notifications through Firebase Cloud Messaging (FCM). There are two delivery paths depending on your setup:
118
+
If you are using the community edition of Chatwoot with the [official mobile app](https://www.chatwoot.com/mobile-apps), push notifications work out of the box with no additional configuration.
119
119
120
-
-**Relay server (default)**: Self-hosted instances without Firebase credentials route notifications through the Chatwoot relay server, which forwards them to the **official Chatwoot mobile app**.
121
-
-**Direct FCM**: Instances with Firebase configured send notifications directly to your **custom-built mobile app**.
122
-
123
-
<Note>
124
-
You must use either the official apps for both platforms or custom builds for both — mixing is not supported. For more details, refer to the [push notification documentation](https://www.chatwoot.com/hc/handbook/articles/1687935909-push-notification).
125
-
</Note>
126
-
127
-
### Using the official mobile app
128
-
129
-
If you are using the community edition of Chatwoot with the [official mobile app](https://www.chatwoot.com/mobile-apps), push notifications work out of the box with no additional configuration. The relay server is enabled by default (`ENABLE_PUSH_RELAY_SERVER=true`).
130
-
131
-
### Setting up Firebase for custom builds
132
-
133
-
If you are building a custom-branded mobile app, you need to configure Firebase on both the mobile app and the Chatwoot server.
134
-
135
-
#### Step 1: Create a Firebase project
136
-
137
-
1. Go to the [Firebase Console](https://console.firebase.google.com/) and create a new project (or use an existing one).
138
-
2. Register your Android app with your package name (e.g., `com.yourcompany.app`).
139
-
3. Register your iOS app with your bundle identifier (e.g., `com.yourcompany.app`).
140
-
141
-
#### Step 2: Download Firebase config files
142
-
143
-
Download the platform-specific configuration files from your Firebase project settings:
144
-
145
-
<Tabs>
146
-
<Tabtitle="Android">
147
-
1. In **Project Settings > General**, find your Android app and click **Download google-services.json**.
148
-
2. Place the file in the root of the mobile app repository.
149
-
</Tab>
150
-
<Tabtitle="iOS">
151
-
1. In **Project Settings > General**, find your iOS app and click **Download GoogleService-Info.plist**.
152
-
2. Place the file in the root of the mobile app repository.
153
-
</Tab>
154
-
</Tabs>
155
-
156
-
#### Step 3: Configure mobile app environment variables
157
-
158
-
Update your `.env` file to point to the Firebase config files:
|`FIREBASE_PROJECT_ID`| Your Firebase project ID (e.g., `my-project-12345`) |
189
-
|`FIREBASE_CREDENTIALS`| The full contents of the service account JSON file |
190
-
191
-
Once both values are set, the server will send push notifications directly to FCM instead of using the relay server.
192
-
193
-
#### Verifying the setup
194
-
195
-
1. Build and install the custom app on a device (`pnpm run:ios` or `pnpm run:android`).
196
-
2. Log in to your Chatwoot instance from the mobile app.
197
-
3. From another browser session, send a message to a conversation assigned to the logged-in agent.
198
-
4. The device should receive a push notification.
199
-
200
-
<Note>
201
-
Push notifications do not work on iOS simulators. You must use a physical device to test.
202
-
</Note>
203
-
204
-
## Deep linking
205
-
206
-
Deep linking allows users to tap a Chatwoot conversation URL (or a push notification) and be taken directly to that conversation in the mobile app. The app supports two mechanisms:
207
-
208
-
-**Custom URL scheme**: `chatwootapp://` — used for SSO callbacks and internal routing.
209
-
-**Universal Links (iOS) / App Links (Android)**: `https://<your-domain>/app/accounts/*/conversations/*` — used for opening web URLs directly in the app.
210
-
211
-
### How it works
212
-
213
-
When the app receives a deep link, React Navigation matches it against the configured path pattern and navigates to the conversation screen:
This works across all app states — whether the app is in the foreground, backgrounded, or was terminated. Push notification taps also use this same flow to navigate to the relevant conversation.
220
-
221
-
### Configuring deep links for custom builds
222
-
223
-
If you are building a custom-branded app with your own domain, you need to configure both the mobile app and the Chatwoot server so that deep links resolve correctly.
224
-
225
-
#### Mobile app configuration
226
-
227
-
The app uses Expo's built-in deep linking support. In `app.config.ts`, update the following to match your domain and bundle identifiers:
228
-
229
-
<Tabs>
230
-
<Tabtitle="iOS">
231
-
232
-
Update the [associated domain](https://docs.expo.dev/linking/ios-universal-links/) to your Chatwoot installation URL:
233
-
234
-
```typescript
235
-
ios: {
236
-
associatedDomains: ['applinks:your-domain.com'],
237
-
}
238
-
```
239
-
240
-
Expo prebuild writes this into the `.entitlements` file automatically.
241
-
242
-
</Tab>
243
-
<Tabtitle="Android">
244
-
245
-
Update the [intent filter](https://docs.expo.dev/linking/android-app-links/) host to your Chatwoot installation URL:
246
-
247
-
```typescript
248
-
android: {
249
-
intentFilters: [
250
-
{
251
-
action: 'VIEW',
252
-
autoVerify: true,
253
-
data: [
254
-
{
255
-
scheme: 'https',
256
-
host: 'your-domain.com',
257
-
pathPrefix: '/app/accounts/',
258
-
},
259
-
],
260
-
category: ['BROWSABLE', 'DEFAULT'],
261
-
},
262
-
],
263
-
}
264
-
```
265
-
266
-
Expo prebuild writes this into the `AndroidManifest.xml` automatically.
267
-
268
-
</Tab>
269
-
</Tabs>
270
-
271
-
After making changes, regenerate the native code:
272
-
273
-
```bash
274
-
pnpm generate
275
-
```
276
-
277
-
#### Server configuration
278
-
279
-
The Chatwoot server dynamically serves the verification files that Android and iOS require to confirm your app owns the domain. Configure the following environment variables on your Chatwoot installation:
280
-
281
-
<Tabs>
282
-
<Tabtitle="iOS">
283
-
284
-
The server serves an `apple-app-site-association` file at `https://<your-domain>/.well-known/apple-app-site-association`. No additional configuration is needed beyond ensuring your Chatwoot installation is accessible at the domain specified in `associatedDomains`.
285
-
286
-
</Tab>
287
-
<Tabtitle="Android">
288
-
289
-
Set the following environment variables with your app's package name and signing certificate fingerprint:
If you are using the official Chatwoot mobile app with `app.chatwoot.com`, deep linking works out of the box with no additional configuration.
309
-
</Note>
310
-
311
-
## Build & Submit using EAS
312
-
313
-
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.
314
-
315
-
You can sign up at [Expo EAS](https://expo.dev/eas).
316
-
317
-
### Build the app
318
-
319
-
#### iOS Build
320
-
321
-
```bash
322
-
pnpm run build:ios:local
323
-
```
324
-
325
-
#### Android Build
326
-
327
-
```bash
328
-
pnpm run build:android:local
329
-
```
330
-
331
-
### Submit the app
332
-
333
-
#### iOS Submission
334
-
335
-
```bash
336
-
pnpm submit:ios
337
-
```
338
-
339
-
#### Android Submission
340
-
341
-
```bash
342
-
pnpm submit:android
343
-
```
344
-
345
-
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:
346
-
347
-
-**iOS**: `.ipa` file
348
-
-**Android**: `.aab` file
349
-
350
-
<Note>
351
-
It may take a while to complete the submission process. You will see the status of the submission on your terminal.
352
-
</Note>
120
+
If you are building a custom-branded app, refer to the [custom mobile app guide](/self-hosted/custom-mobile-app) for Firebase, deep linking, and build setup.
0 commit comments