@cometchat/skills 4.3.0 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/bin/install.js +27 -0
- package/package.json +14 -1
- package/skills/cometchat/SKILL.md +233 -69
- package/skills/cometchat/references/asking-questions.md +48 -0
- package/skills/cometchat-a11y/SKILL.md +3 -2
- package/skills/cometchat-android-v5/SKILL.md +2 -1
- package/skills/cometchat-android-v5-calls/SKILL.md +36 -22
- package/skills/cometchat-android-v5-calls/references/README.md +1 -1
- package/skills/cometchat-android-v5-calls/references/add-calls-to-existing-chat.md +7 -5
- package/skills/cometchat-android-v5-calls/references/audio-controls.md +4 -4
- package/skills/cometchat-android-v5-calls/references/call-layouts.md +33 -25
- package/skills/cometchat-android-v5-calls/references/call-session.md +2 -2
- package/skills/cometchat-android-v5-calls/references/custom-ui.md +5 -5
- package/skills/cometchat-android-v5-calls/references/event-listeners.md +2 -2
- package/skills/cometchat-android-v5-calls/references/idle-timeout.md +20 -14
- package/skills/cometchat-android-v5-calls/references/in-call-chat.md +1 -1
- package/skills/cometchat-android-v5-calls/references/migration-v4-to-v5.md +43 -27
- package/skills/cometchat-android-v5-calls/references/participant-management.md +3 -3
- package/skills/cometchat-android-v5-calls/references/raise-hand.md +25 -19
- package/skills/cometchat-android-v5-calls/references/recording.md +2 -2
- package/skills/cometchat-android-v5-calls/references/ringing-integration.md +1 -1
- package/skills/cometchat-android-v5-calls/references/screen-sharing.md +5 -9
- package/skills/cometchat-android-v5-calls/references/session-settings.md +3 -3
- package/skills/cometchat-android-v5-calls/references/setup.md +1 -1
- package/skills/cometchat-android-v5-calls/references/share-invite.md +9 -4
- package/skills/cometchat-android-v5-calls/references/video-controls.md +4 -4
- package/skills/cometchat-android-v5-calls/references/voip-calling.md +2 -2
- package/skills/cometchat-android-v5-components/SKILL.md +4 -3
- package/skills/cometchat-android-v5-core/SKILL.md +5 -3
- package/skills/cometchat-android-v5-customization/SKILL.md +171 -7
- package/skills/cometchat-android-v5-extensions/SKILL.md +7 -4
- package/skills/cometchat-android-v5-features/SKILL.md +5 -4
- package/skills/cometchat-android-v5-placement/SKILL.md +2 -1
- package/skills/cometchat-android-v5-production/SKILL.md +2 -1
- package/skills/cometchat-android-v5-push/SKILL.md +2 -3
- package/skills/cometchat-android-v5-testing/SKILL.md +2 -1
- package/skills/cometchat-android-v5-theming/SKILL.md +2 -1
- package/skills/cometchat-android-v5-troubleshooting/SKILL.md +3 -2
- package/skills/cometchat-android-v6/SKILL.md +2 -1
- package/skills/cometchat-android-v6-builder-settings/SKILL.md +11 -7
- package/skills/cometchat-android-v6-calls/SKILL.md +79 -18
- package/skills/cometchat-android-v6-calls/references/advanced-features.md +87 -0
- package/skills/cometchat-android-v6-calls/references/call-layouts.md +24 -15
- package/skills/cometchat-android-v6-calls/references/call-session.md +2 -2
- package/skills/cometchat-android-v6-calls/references/device-management.md +17 -16
- package/skills/cometchat-android-v6-calls/references/idle-timeout.md +7 -4
- package/skills/cometchat-android-v6-calls/references/in-call-chat.md +13 -8
- package/skills/cometchat-android-v6-calls/references/raise-hand.md +6 -4
- package/skills/cometchat-android-v6-compose-components/SKILL.md +52 -29
- package/skills/cometchat-android-v6-compose-customization/SKILL.md +156 -1
- package/skills/cometchat-android-v6-compose-placement/SKILL.md +129 -40
- package/skills/cometchat-android-v6-compose-theming/SKILL.md +27 -1
- package/skills/cometchat-android-v6-core/SKILL.md +208 -28
- package/skills/cometchat-android-v6-events/SKILL.md +4 -1
- package/skills/cometchat-android-v6-extensions/SKILL.md +2 -1
- package/skills/cometchat-android-v6-features/SKILL.md +26 -2
- package/skills/cometchat-android-v6-kotlin-components/SKILL.md +31 -1
- package/skills/cometchat-android-v6-kotlin-customization/SKILL.md +172 -1
- package/skills/cometchat-android-v6-kotlin-placement/SKILL.md +20 -5
- package/skills/cometchat-android-v6-kotlin-theming/SKILL.md +36 -5
- package/skills/cometchat-android-v6-migration/SKILL.md +44 -42
- package/skills/cometchat-android-v6-production/SKILL.md +6 -3
- package/skills/cometchat-android-v6-push/SKILL.md +43 -2
- package/skills/cometchat-android-v6-testing/SKILL.md +11 -8
- package/skills/cometchat-android-v6-troubleshooting/SKILL.md +26 -5
- package/skills/cometchat-angular-calls/SKILL.md +256 -389
- package/skills/cometchat-angular-calls/references/add-calls-to-existing-chat.md +3 -2
- package/skills/cometchat-angular-calls/references/call-layouts.md +29 -12
- package/skills/cometchat-angular-calls/references/call-session.md +2 -2
- package/skills/cometchat-angular-calls/references/custom-ui.md +18 -10
- package/skills/cometchat-angular-calls/references/device-management.md +53 -34
- package/skills/cometchat-angular-calls/references/group-calls.md +45 -24
- package/skills/cometchat-angular-calls/references/idle-timeout.md +31 -15
- package/skills/cometchat-angular-calls/references/ngzone-and-async-callbacks.md +7 -6
- package/skills/cometchat-angular-calls/references/raise-hand.md +9 -4
- package/skills/cometchat-angular-calls/references/recording-screen-share.md +32 -39
- package/skills/cometchat-angular-calls/references/ringing-integration.md +3 -1
- package/skills/cometchat-angular-calls/references/share-invite.md +11 -5
- package/skills/cometchat-angular-calls/references/virtual-background.md +29 -0
- package/skills/cometchat-angular-components/SKILL.md +149 -620
- package/skills/cometchat-angular-core/SKILL.md +232 -312
- package/skills/cometchat-angular-customization/SKILL.md +415 -223
- package/skills/cometchat-angular-features/SKILL.md +216 -334
- package/skills/cometchat-angular-patterns/SKILL.md +168 -359
- package/skills/cometchat-angular-placement/SKILL.md +189 -560
- package/skills/cometchat-angular-production/SKILL.md +241 -92
- package/skills/cometchat-angular-push/SKILL.md +280 -294
- package/skills/cometchat-angular-testing/SKILL.md +430 -158
- package/skills/cometchat-angular-theming/SKILL.md +190 -265
- package/skills/cometchat-angular-troubleshooting/SKILL.md +192 -157
- package/skills/cometchat-astro-patterns/SKILL.md +2 -1
- package/skills/cometchat-calls/SKILL.md +25 -19
- package/skills/cometchat-calls/references/use-case-broadcast.md +15 -10
- package/skills/cometchat-calls/references/use-case-marketplace.md +2 -3
- package/skills/cometchat-calls/references/use-case-support.md +3 -4
- package/skills/cometchat-calls/references/use-case-team.md +23 -12
- package/skills/cometchat-calls/references/use-case-telehealth.md +3 -4
- package/skills/cometchat-components/SKILL.md +163 -25
- package/skills/cometchat-core/SKILL.md +255 -19
- package/skills/cometchat-customization/SKILL.md +50 -25
- package/skills/cometchat-features/SKILL.md +313 -34
- package/skills/cometchat-flutter-v5/SKILL.md +10 -4
- package/skills/cometchat-flutter-v5-calls/SKILL.md +188 -158
- package/skills/cometchat-flutter-v5-calls/references/add-calls-to-existing-chat.md +48 -24
- package/skills/cometchat-flutter-v5-calls/references/call-layouts.md +20 -15
- package/skills/cometchat-flutter-v5-calls/references/call-session.md +100 -145
- package/skills/cometchat-flutter-v5-calls/references/device-management.md +12 -8
- package/skills/cometchat-flutter-v5-calls/references/group-calls.md +30 -36
- package/skills/cometchat-flutter-v5-calls/references/idle-timeout.md +15 -13
- package/skills/cometchat-flutter-v5-calls/references/in-call-chat.md +12 -9
- package/skills/cometchat-flutter-v5-calls/references/migration-v4-to-v5.md +115 -65
- package/skills/cometchat-flutter-v5-calls/references/raise-hand.md +41 -30
- package/skills/cometchat-flutter-v5-calls/references/ringing-integration.md +17 -14
- package/skills/cometchat-flutter-v5-calls/references/share-invite.md +8 -2
- package/skills/cometchat-flutter-v5-conversations/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-core/SKILL.md +5 -4
- package/skills/cometchat-flutter-v5-customization/SKILL.md +136 -5
- package/skills/cometchat-flutter-v5-events/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-messages/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-production/SKILL.md +15 -6
- package/skills/cometchat-flutter-v5-push/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-testing/SKILL.md +17 -6
- package/skills/cometchat-flutter-v5-theming/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-troubleshooting/SKILL.md +7 -6
- package/skills/cometchat-flutter-v5-users-groups/SKILL.md +3 -2
- package/skills/cometchat-flutter-v6/SKILL.md +17 -16
- package/skills/cometchat-flutter-v6-calls/SKILL.md +72 -57
- package/skills/cometchat-flutter-v6-calls/references/add-calls-to-existing-chat.md +5 -3
- package/skills/cometchat-flutter-v6-calls/references/advanced-features.md +89 -0
- package/skills/cometchat-flutter-v6-calls/references/call-layouts.md +15 -12
- package/skills/cometchat-flutter-v6-calls/references/call-session.md +2 -2
- package/skills/cometchat-flutter-v6-calls/references/device-management.md +9 -3
- package/skills/cometchat-flutter-v6-calls/references/group-calls.md +10 -10
- package/skills/cometchat-flutter-v6-calls/references/idle-timeout.md +15 -7
- package/skills/cometchat-flutter-v6-calls/references/in-call-chat.md +6 -3
- package/skills/cometchat-flutter-v6-calls/references/raise-hand.md +23 -16
- package/skills/cometchat-flutter-v6-components/SKILL.md +32 -11
- package/skills/cometchat-flutter-v6-conversations/SKILL.md +39 -11
- package/skills/cometchat-flutter-v6-core/SKILL.md +182 -21
- package/skills/cometchat-flutter-v6-customization/SKILL.md +97 -25
- package/skills/cometchat-flutter-v6-events/SKILL.md +3 -2
- package/skills/cometchat-flutter-v6-features/SKILL.md +15 -6
- package/skills/cometchat-flutter-v6-messages/SKILL.md +111 -60
- package/skills/cometchat-flutter-v6-migration/SKILL.md +18 -25
- package/skills/cometchat-flutter-v6-placement/SKILL.md +79 -50
- package/skills/cometchat-flutter-v6-production/SKILL.md +13 -12
- package/skills/cometchat-flutter-v6-push/SKILL.md +41 -19
- package/skills/cometchat-flutter-v6-testing/SKILL.md +4 -4
- package/skills/cometchat-flutter-v6-theming/SKILL.md +38 -5
- package/skills/cometchat-flutter-v6-troubleshooting/SKILL.md +182 -17
- package/skills/cometchat-flutter-v6-users-groups/SKILL.md +12 -4
- package/skills/cometchat-i18n/SKILL.md +139 -78
- package/skills/cometchat-ios/SKILL.md +4 -2
- package/skills/cometchat-ios-calls/SKILL.md +225 -95
- package/skills/cometchat-ios-calls/references/add-calls-to-existing-chat.md +11 -9
- package/skills/cometchat-ios-calls/references/audio-modes-and-controls.md +45 -0
- package/skills/cometchat-ios-calls/references/avaudiosession-routing.md +6 -7
- package/skills/cometchat-ios-calls/references/call-layouts.md +31 -91
- package/skills/cometchat-ios-calls/references/call-session.md +51 -54
- package/skills/cometchat-ios-calls/references/callkit-and-pushkit.md +33 -29
- package/skills/cometchat-ios-calls/references/custom-ui.md +38 -38
- package/skills/cometchat-ios-calls/references/group-calls.md +33 -70
- package/skills/cometchat-ios-calls/references/idle-timeout.md +24 -25
- package/skills/cometchat-ios-calls/references/in-call-chat.md +19 -23
- package/skills/cometchat-ios-calls/references/migration-v4-to-v5.md +128 -70
- package/skills/cometchat-ios-calls/references/picture-in-picture.md +20 -20
- package/skills/cometchat-ios-calls/references/raise-hand.md +14 -227
- package/skills/cometchat-ios-calls/references/recording-screen-share.md +35 -122
- package/skills/cometchat-ios-calls/references/ringing-integration.md +17 -16
- package/skills/cometchat-ios-calls/references/share-invite.md +8 -12
- package/skills/cometchat-ios-calls/references/swiftui-uikit-hosting.md +4 -4
- package/skills/cometchat-ios-components/SKILL.md +200 -12
- package/skills/cometchat-ios-core/SKILL.md +173 -45
- package/skills/cometchat-ios-customization/SKILL.md +276 -110
- package/skills/cometchat-ios-features/SKILL.md +64 -36
- package/skills/cometchat-ios-placement/SKILL.md +15 -12
- package/skills/cometchat-ios-production/SKILL.md +12 -4
- package/skills/cometchat-ios-push/SKILL.md +53 -19
- package/skills/cometchat-ios-testing/SKILL.md +14 -9
- package/skills/cometchat-ios-theming/SKILL.md +39 -3
- package/skills/cometchat-ios-troubleshooting/SKILL.md +41 -21
- package/skills/cometchat-native-bare-patterns/SKILL.md +34 -17
- package/skills/cometchat-native-calls/SKILL.md +28 -16
- package/skills/cometchat-native-calls/references/add-calls-to-existing-chat.md +2 -2
- package/skills/cometchat-native-calls/references/call-layouts.md +15 -14
- package/skills/cometchat-native-calls/references/call-session.md +2 -2
- package/skills/cometchat-native-calls/references/custom-ui.md +12 -8
- package/skills/cometchat-native-calls/references/device-management.md +53 -30
- package/skills/cometchat-native-calls/references/group-calls.md +35 -30
- package/skills/cometchat-native-calls/references/idle-timeout.md +6 -6
- package/skills/cometchat-native-calls/references/in-call-chat.md +10 -8
- package/skills/cometchat-native-calls/references/migration-v4-to-v5.md +2 -2
- package/skills/cometchat-native-calls/references/raise-hand.md +15 -13
- package/skills/cometchat-native-calls/references/recording-screen-share.md +49 -170
- package/skills/cometchat-native-calls/references/share-invite.md +7 -5
- package/skills/cometchat-native-calls/references/voip-push-end-to-end.md +4 -2
- package/skills/cometchat-native-components/SKILL.md +84 -52
- package/skills/cometchat-native-core/SKILL.md +101 -32
- package/skills/cometchat-native-customization/SKILL.md +150 -28
- package/skills/cometchat-native-expo-patterns/SKILL.md +57 -26
- package/skills/cometchat-native-features/SKILL.md +23 -16
- package/skills/cometchat-native-placement/SKILL.md +19 -10
- package/skills/cometchat-native-production/SKILL.md +9 -3
- package/skills/cometchat-native-push/SKILL.md +2 -1
- package/skills/cometchat-native-testing/SKILL.md +1 -2
- package/skills/cometchat-native-theming/SKILL.md +54 -29
- package/skills/cometchat-native-troubleshooting/SKILL.md +9 -3
- package/skills/cometchat-nextjs-patterns/SKILL.md +20 -6
- package/skills/cometchat-placement/SKILL.md +42 -3
- package/skills/cometchat-production/SKILL.md +12 -5
- package/skills/cometchat-react-calls/SKILL.md +220 -10
- package/skills/cometchat-react-calls/references/add-calls-to-existing-chat.md +4 -3
- package/skills/cometchat-react-calls/references/call-layouts.md +5 -6
- package/skills/cometchat-react-calls/references/call-session.md +1 -1
- package/skills/cometchat-react-calls/references/custom-ui.md +61 -15
- package/skills/cometchat-react-calls/references/device-management.md +55 -51
- package/skills/cometchat-react-calls/references/group-calls.md +18 -23
- package/skills/cometchat-react-calls/references/idle-timeout.md +25 -12
- package/skills/cometchat-react-calls/references/in-call-chat.md +7 -7
- package/skills/cometchat-react-calls/references/migration-v4-to-v5.md +9 -11
- package/skills/cometchat-react-calls/references/raise-hand.md +14 -14
- package/skills/cometchat-react-calls/references/recording-screen-share.md +39 -38
- package/skills/cometchat-react-calls/references/ringing-integration.md +2 -2
- package/skills/cometchat-react-calls/references/share-invite.md +4 -5
- package/skills/cometchat-react-calls/references/testing-calls-on-web.md +20 -2
- package/skills/cometchat-react-calls/references/virtual-background.md +32 -0
- package/skills/cometchat-react-patterns/SKILL.md +44 -4
- package/skills/cometchat-react-push/SKILL.md +258 -72
- package/skills/cometchat-react-router-patterns/SKILL.md +10 -4
- package/skills/cometchat-react-testing/SKILL.md +14 -5
- package/skills/cometchat-theming/SKILL.md +181 -18
- package/skills/cometchat-troubleshooting/SKILL.md +40 -20
|
@@ -3,7 +3,6 @@ name: cometchat-native-expo-patterns
|
|
|
3
3
|
description: "Integration patterns for Expo managed workflow — app.json config, permissions, gesture handler setup, env vars, Expo Router file-based routing subsection."
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "Node.js >=18; Expo SDK >=50; @cometchat/chat-uikit-react-native ^5"
|
|
6
|
-
allowed-tools: "shell, file-read, file-search, file-list, ask-user"
|
|
7
6
|
metadata:
|
|
8
7
|
author: "CometChat"
|
|
9
8
|
version: "3.0.0"
|
|
@@ -24,7 +23,7 @@ Teaches Claude how to integrate CometChat into an Expo managed workflow project.
|
|
|
24
23
|
|
|
25
24
|
**Read `cometchat-native-core` first** (init/login/wrapper chain + anti-patterns), then `cometchat-native-components` (prop reference), then `cometchat-native-placement` (where chat goes).
|
|
26
25
|
|
|
27
|
-
Ground truth: `docs/ui-kit/react-native/expo-integration.mdx`, `expo-conversation.mdx`, `expo-one-to-one-chat.mdx`, `expo-tab-based-chat.mdx`, and `examples/SampleAppExpo/`.
|
|
26
|
+
Ground truth: `docs/ui-kit/react-native/expo-integration.mdx`, `expo-conversation.mdx`, `expo-one-to-one-chat.mdx`, `expo-tab-based-chat.mdx`, and `examples/SampleAppExpo/`. **Official docs:** https://www.cometchat.com/docs/ui-kit/react-native/overview · **Docs MCP:** `claude mcp add --transport http cometchat-docs https://www.cometchat.com/docs/mcp` (or fetch the URL directly without MCP).
|
|
28
27
|
|
|
29
28
|
---
|
|
30
29
|
|
|
@@ -81,8 +80,18 @@ npx expo install \
|
|
|
81
80
|
|
|
82
81
|
# dayjs + punycode — no native code but required by the kit
|
|
83
82
|
npm install dayjs punycode
|
|
83
|
+
|
|
84
|
+
# Navigation — REQUIRED if you follow cometchat-native-placement's stack pattern
|
|
85
|
+
# (createNativeStackNavigator + NavigationContainer). Not transitive — add them:
|
|
86
|
+
npx expo install \
|
|
87
|
+
@react-navigation/native \
|
|
88
|
+
@react-navigation/native-stack \
|
|
89
|
+
react-native-screens \
|
|
90
|
+
expo-constants
|
|
84
91
|
```
|
|
85
92
|
|
|
93
|
+
> **`expo-constants` is also imported directly** by Step 3 / Step 4 Option A (`import Constants from "expo-constants"`). It ships transitively with Expo, but importing it directly is a direct-dependency contract — the `expo install` line above lists it explicitly so a fresh install doesn't break.
|
|
94
|
+
|
|
86
95
|
**Why `npx expo install` for the natively-linked deps?** `expo install` picks versions compatible with the project's Expo SDK. Using `npm install` directly can land incompatible versions that break prebuild.
|
|
87
96
|
|
|
88
97
|
### Optional — calling SDK
|
|
@@ -158,8 +167,8 @@ Expo projects use the same four-wrapper chain as bare RN (see `cometchat-native-
|
|
|
158
167
|
import "react-native-gesture-handler"; // MUST be the first import
|
|
159
168
|
import React from "react";
|
|
160
169
|
import { GestureHandlerRootView } from "react-native-gesture-handler";
|
|
161
|
-
import { SafeAreaProvider } from "react-native-safe-area-context";
|
|
162
|
-
import { CometChatThemeProvider } from "@cometchat/chat-uikit-react-native";
|
|
170
|
+
import { SafeAreaProvider, SafeAreaView } from "react-native-safe-area-context";
|
|
171
|
+
import { CometChatThemeProvider, CometChatI18nProvider } from "@cometchat/chat-uikit-react-native";
|
|
163
172
|
import { CometChatProvider } from "./src/providers/CometChatProvider";
|
|
164
173
|
import { AppNavigator } from "./src/navigation/AppNavigator";
|
|
165
174
|
import Constants from "expo-constants";
|
|
@@ -171,14 +180,18 @@ export default function App() {
|
|
|
171
180
|
<GestureHandlerRootView style={{ flex: 1 }}>
|
|
172
181
|
<SafeAreaProvider>
|
|
173
182
|
<CometChatThemeProvider>
|
|
174
|
-
<
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
183
|
+
<CometChatI18nProvider>
|
|
184
|
+
<CometChatProvider
|
|
185
|
+
appId={extra.COMETCHAT_APP_ID}
|
|
186
|
+
region={extra.COMETCHAT_REGION}
|
|
187
|
+
authKey={extra.COMETCHAT_AUTH_KEY}
|
|
188
|
+
uid="cometchat-uid-1" // dev mode only
|
|
189
|
+
>
|
|
190
|
+
<SafeAreaView edges={["top", "bottom"]} style={{ flex: 1 }}>
|
|
191
|
+
<AppNavigator />
|
|
192
|
+
</SafeAreaView>
|
|
193
|
+
</CometChatProvider>
|
|
194
|
+
</CometChatI18nProvider>
|
|
182
195
|
</CometChatThemeProvider>
|
|
183
196
|
</SafeAreaProvider>
|
|
184
197
|
</GestureHandlerRootView>
|
|
@@ -186,7 +199,7 @@ export default function App() {
|
|
|
186
199
|
}
|
|
187
200
|
```
|
|
188
201
|
|
|
189
|
-
The `CometChatProvider` itself is defined per `cometchat-native-core` § 6 — reuse that implementation; don't invent another one.
|
|
202
|
+
The provider chain matches the kit sample app (`examples/SampleApp/App.tsx`): `CometChatI18nProvider` sits inside `CometChatThemeProvider`, and a root `SafeAreaView edges={["top", "bottom"]}` wraps the navigator. The `CometChatProvider` itself is defined per `cometchat-native-core` § 6 — reuse that implementation; don't invent another one.
|
|
190
203
|
|
|
191
204
|
### `import "react-native-gesture-handler"` must be first
|
|
192
205
|
|
|
@@ -280,8 +293,8 @@ In Expo Router, the `app/_layout.tsx` file is the root layout — wrap the provi
|
|
|
280
293
|
// app/_layout.tsx
|
|
281
294
|
import "react-native-gesture-handler";
|
|
282
295
|
import { GestureHandlerRootView } from "react-native-gesture-handler";
|
|
283
|
-
import { SafeAreaProvider } from "react-native-safe-area-context";
|
|
284
|
-
import { CometChatThemeProvider } from "@cometchat/chat-uikit-react-native";
|
|
296
|
+
import { SafeAreaProvider, SafeAreaView } from "react-native-safe-area-context";
|
|
297
|
+
import { CometChatThemeProvider, CometChatI18nProvider } from "@cometchat/chat-uikit-react-native";
|
|
285
298
|
import { CometChatProvider } from "../src/providers/CometChatProvider";
|
|
286
299
|
import { Slot } from "expo-router";
|
|
287
300
|
import Constants from "expo-constants";
|
|
@@ -293,14 +306,18 @@ export default function RootLayout() {
|
|
|
293
306
|
<GestureHandlerRootView style={{ flex: 1 }}>
|
|
294
307
|
<SafeAreaProvider>
|
|
295
308
|
<CometChatThemeProvider>
|
|
296
|
-
<
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
309
|
+
<CometChatI18nProvider>
|
|
310
|
+
<CometChatProvider
|
|
311
|
+
appId={extra.COMETCHAT_APP_ID}
|
|
312
|
+
region={extra.COMETCHAT_REGION}
|
|
313
|
+
authKey={extra.COMETCHAT_AUTH_KEY}
|
|
314
|
+
uid="cometchat-uid-1"
|
|
315
|
+
>
|
|
316
|
+
<SafeAreaView edges={["top", "bottom"]} style={{ flex: 1 }}>
|
|
317
|
+
<Slot /> {/* Expo Router renders child routes here */}
|
|
318
|
+
</SafeAreaView>
|
|
319
|
+
</CometChatProvider>
|
|
320
|
+
</CometChatI18nProvider>
|
|
304
321
|
</CometChatThemeProvider>
|
|
305
322
|
</SafeAreaProvider>
|
|
306
323
|
</GestureHandlerRootView>
|
|
@@ -344,7 +361,7 @@ export default function Home() {
|
|
|
344
361
|
// app/messages/[uid].tsx
|
|
345
362
|
import { useLocalSearchParams, router } from "expo-router";
|
|
346
363
|
import { useEffect, useState } from "react";
|
|
347
|
-
import { View } from "react-native";
|
|
364
|
+
import { Platform, View } from "react-native";
|
|
348
365
|
import { CometChat } from "@cometchat/chat-sdk-react-native";
|
|
349
366
|
import {
|
|
350
367
|
CometChatMessageHeader,
|
|
@@ -368,7 +385,10 @@ export default function ChatScreen() {
|
|
|
368
385
|
<View style={{ flex: 1 }}>
|
|
369
386
|
<CometChatMessageHeader user={user} onBack={() => router.back()} showBackButton />
|
|
370
387
|
<CometChatMessageList user={user} hideReplyInThreadOption />
|
|
371
|
-
<CometChatMessageComposer
|
|
388
|
+
<CometChatMessageComposer
|
|
389
|
+
user={user}
|
|
390
|
+
keyboardAvoidingViewProps={Platform.OS === "android" ? {} : { behavior: "padding" }}
|
|
391
|
+
/>
|
|
372
392
|
</View>
|
|
373
393
|
);
|
|
374
394
|
}
|
|
@@ -448,7 +468,17 @@ Subsequent runs use `npx expo start` with the dev client — no rebuild needed u
|
|
|
448
468
|
## Step 7 — Verify integration
|
|
449
469
|
|
|
450
470
|
```bash
|
|
451
|
-
npx tsc --noEmit
|
|
471
|
+
# ⚠️ Plain `npx tsc --noEmit` will report DOZENS of errors that are NOT yours.
|
|
472
|
+
# The kit (@cometchat/chat-uikit-react-native) ships raw uncompiled .tsx and
|
|
473
|
+
# points "types" at src/index, so tsc compiles the kit's own source into your
|
|
474
|
+
# program. `skipLibCheck` (only skips .d.ts) and `exclude: [node_modules]`
|
|
475
|
+
# (imported files are still checked) do NOT silence it. Verified on a clean
|
|
476
|
+
# Expo SDK 56 + kit 5.3.7 + chat-sdk 4.0.24 install: 32 kit-internal errors.
|
|
477
|
+
#
|
|
478
|
+
# PASS CRITERION = zero errors OUTSIDE node_modules. Filter the kit noise:
|
|
479
|
+
npx tsc --noEmit 2>&1 | grep -v node_modules | grep 'error TS'
|
|
480
|
+
# ^ EMPTY output = your integration type-checks clean (PASS).
|
|
481
|
+
# Any line here = a real error in YOUR code — fix it.
|
|
452
482
|
```
|
|
453
483
|
|
|
454
484
|
Then in the running app:
|
|
@@ -516,6 +546,7 @@ If the customer picks **Visually** in dispatcher Step 3.1, the Expo recipe diver
|
|
|
516
546
|
- Env via `process.env.EXPO_PUBLIC_COMETCHAT_*` (no extra Babel plugin needed; Expo handles this).
|
|
517
547
|
- Required additional deps beyond the standard provider set: `zustand`, `@react-native-async-storage/async-storage`.
|
|
518
548
|
- `useConfig(s => s.settings.style)` — note the selector takes `AppConfig` directly, NOT `s.config.settings.style` (the `.config.` wrapper is internal to the Zustand store — Finding F6, 2026-05-21).
|
|
549
|
+
- Envelope is `settings: { chatFeatures, callFeatures, layout, style, noCode }` — theme tokens live under `settings.style` (there's no `settings.theme`/`settings.agent`); the engagement feature group is `chatFeatures.deeperUserEngagement` (not `deeperEngagement`). See core §"Feature flag access".
|
|
519
550
|
- A2 smoke validated: Metro bundles 10.8 MB iOS export clean on Expo SDK 54.
|
|
520
551
|
|
|
521
552
|
If the customer picks **In code**, ignore this section — the standard four-wrapper chain + provider pattern from §"Provider chain" applies.
|
|
@@ -3,7 +3,6 @@ name: cometchat-native-features
|
|
|
3
3
|
description: "Feature catalog for React Native — calls (separate SDK + WebRTC), extensions (polls / stickers / translation / link preview / collaborative doc / whiteboard / smart replies), AI agent, in-call chat. When to toggle, install, or swap."
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "Node.js >=18; React Native >=0.70; @cometchat/chat-uikit-react-native ^5"
|
|
6
|
-
allowed-tools: "shell, file-read, file-search, file-list, ask-user"
|
|
7
6
|
metadata:
|
|
8
7
|
author: "CometChat"
|
|
9
8
|
version: "3.0.0"
|
|
@@ -22,7 +21,7 @@ Ground truth: `docs/ui-kit/react-native/core-features.mdx`, `calling-integration
|
|
|
22
21
|
|
|
23
22
|
## 1. Feature taxonomy
|
|
24
23
|
|
|
25
|
-
Every CometChat feature falls into exactly one of
|
|
24
|
+
Every CometChat feature falls into exactly one of these five **mechanism** categories — these tell you *how* to wire each feature (the actionable RN view). They map onto the product's canonical **5-tier "work-needed" model** (Core Zero-Setup → Builder-Enabled → Config-Only → Config+Settings → SDK-Integrated; see `cometchat-features` §3 + `packages/registry/v6/features/catalog.json`; canonical public matrix → [Features & Extensions Guide](https://www.cometchat.com/docs/fundamentals/features-and-extensions-guide), which outranks this snapshot on conflict): Default ≈ Core; Extension/AI ≈ Config-Only / Config+Settings; Package-install + Component-swap ≈ SDK-Integrated. The category determines the recipe:
|
|
26
25
|
|
|
27
26
|
| Category | What it means | Example features | How to enable |
|
|
28
27
|
|---|---|---|---|
|
|
@@ -215,6 +214,7 @@ All three call surfaces — `<CometChatIncomingCall>`, `<CometChatOutgoingCall>`
|
|
|
215
214
|
import React, { useEffect, useState } from "react";
|
|
216
215
|
import { StyleSheet, View } from "react-native";
|
|
217
216
|
import { CometChat } from "@cometchat/chat-sdk-react-native";
|
|
217
|
+
import { CometChatCalls } from "@cometchat/calls-sdk-react-native";
|
|
218
218
|
import {
|
|
219
219
|
CometChatIncomingCall,
|
|
220
220
|
CometChatOutgoingCall,
|
|
@@ -275,7 +275,12 @@ function CallEventsProvider({ children }: { children: React.ReactNode }) {
|
|
|
275
275
|
)}
|
|
276
276
|
{ongoingCall && (
|
|
277
277
|
<View style={StyleSheet.absoluteFill}>
|
|
278
|
-
|
|
278
|
+
{/* CometChatOngoingCallInterface = { sessionID (required), callSettingsBuilder (required), onError? } — there is NO `call` prop (verified vs uikit-react-native-v5 CometChatOngoingCall.tsx) */}
|
|
279
|
+
<CometChatOngoingCall
|
|
280
|
+
sessionID={ongoingCall.getSessionId()}
|
|
281
|
+
callSettingsBuilder={new CometChatCalls.CallSettingsBuilder().setIsAudioOnlyCall(ongoingCall.getType() === "audio")}
|
|
282
|
+
onError={() => setOngoingCall(null)}
|
|
283
|
+
/>
|
|
279
284
|
</View>
|
|
280
285
|
)}
|
|
281
286
|
</>
|
|
@@ -306,13 +311,12 @@ Once the calls SDK is installed, `CometChatMessageHeader` auto-renders voice + v
|
|
|
306
311
|
user={selectedUser}
|
|
307
312
|
hideVoiceCallButton={false}
|
|
308
313
|
hideVideoCallButton={false}
|
|
309
|
-
AuxiliaryButtonView={(user, group) => (
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
/>
|
|
314
|
+
AuxiliaryButtonView={({ user, group }) => (
|
|
315
|
+
// Slot views receive ONE destructured object ({ user, group }) — NOT positional args.
|
|
316
|
+
// CometChatCallButtons has NO onVoiceCallPress/onVideoCallPress — it initiates the call
|
|
317
|
+
// itself and emits ccOutgoingCall / ccShowOngoingCall on the UI event bus. Mount the
|
|
318
|
+
// in-call surface from those listeners (§3d), not from a press callback.
|
|
319
|
+
<CometChatCallButtons user={user} group={group} />
|
|
316
320
|
)}
|
|
317
321
|
/>
|
|
318
322
|
```
|
|
@@ -330,9 +334,12 @@ export function OngoingCallScreen({ route, navigation }: any) {
|
|
|
330
334
|
return (
|
|
331
335
|
<CometChatOngoingCall
|
|
332
336
|
sessionID={session.sessionId}
|
|
333
|
-
|
|
334
|
-
|
|
337
|
+
// REQUIRED: a CometChatCalls.CallSettingsBuilder instance (the kit calls .build() on it).
|
|
338
|
+
callSettingsBuilder={new CometChatCalls.CallSettingsBuilder().setIsAudioOnlyCall(session.type === "audio")}
|
|
339
|
+
onError={() => navigation.goBack()}
|
|
335
340
|
/>
|
|
341
|
+
// There is no `callType`/`onCallEnded` prop. End-of-call navigation is driven by the
|
|
342
|
+
// ccCallEnded listener (§3d) resetting the parent's state.
|
|
336
343
|
);
|
|
337
344
|
}
|
|
338
345
|
```
|
|
@@ -388,9 +395,9 @@ During an active call, users can chat without leaving the call UI. This is a tog
|
|
|
388
395
|
```tsx
|
|
389
396
|
<CometChatOngoingCall
|
|
390
397
|
sessionID={session.sessionId}
|
|
391
|
-
|
|
392
|
-
callSettingsBuilder={
|
|
393
|
-
|
|
398
|
+
// REQUIRED — a CometChatCalls.CallSettingsBuilder (enable in-call chat via its setter).
|
|
399
|
+
callSettingsBuilder={callSettingsBuilder}
|
|
400
|
+
onError={() => navigation.goBack()}
|
|
394
401
|
/>
|
|
395
402
|
```
|
|
396
403
|
|
|
@@ -588,7 +595,7 @@ When a user asks for a feature, use this flow:
|
|
|
588
595
|
2. **Is it voice / video / call history?** → Calls (§ 3). Package install.
|
|
589
596
|
3. **Is it polls, stickers, message translation, link preview, collaborative doc / whiteboard, thumbnails?** → Extension (§ 2). Run `cometchat apply-feature <id>`.
|
|
590
597
|
3a. **Is it smart replies, conversation summary, or conversation starter?** → AI feature (§ 2). Run `cometchat apply-feature <id> --openai-key sk-...`.
|
|
591
|
-
3b. **Is it Giphy / Stipop / Tenor / Chatwoot / Intercom / Disappearing Messages / Message Shortcuts?** → Dashboard-only (§ 2). User must enter third-party config in https://app.cometchat.com →
|
|
598
|
+
3b. **Is it Giphy / Stipop / Tenor / Chatwoot / Intercom / Disappearing Messages / Message Shortcuts?** → Dashboard-only (§ 2). User must enter third-party config in https://app.cometchat.com → Chat & Messaging → Features.
|
|
592
599
|
4. **Is it AI agent?** → § 5.
|
|
593
600
|
5. **Is it custom text formatting, custom message templates, custom slot views, custom theme?** → This is **customization**, not a feature. Route to `cometchat-native-customization` or `cometchat-native-theming`.
|
|
594
601
|
6. **Not on this list?** → Check `docs/ui-kit/react-native/guide-overview.mdx` + the kit's `src/index.ts` exports. If still nothing, tell the user the feature isn't in the UI Kit; they may need to build it with the SDK directly.
|
|
@@ -3,7 +3,6 @@ name: cometchat-native-placement
|
|
|
3
3
|
description: "Where to put chat in a React Native app — Stack screen, BottomTab, Modal, BottomSheet, Embedded. Maps each to CometChat component composition with ASCII layout references."
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "Node.js >=18; React Native >=0.70; @cometchat/chat-uikit-react-native ^5"
|
|
6
|
-
allowed-tools: "shell, file-read, file-search, file-list, ask-user"
|
|
7
6
|
metadata:
|
|
8
7
|
author: "CometChat"
|
|
9
8
|
version: "3.0.0"
|
|
@@ -19,7 +18,7 @@ Teaches Claude the five canonical placement patterns for putting chat inside a R
|
|
|
19
18
|
3. Platform gotchas (safe-area, keyboard avoiding, gesture handling)
|
|
20
19
|
4. When to choose this placement over the alternatives
|
|
21
20
|
|
|
22
|
-
Ground truth: `docs/ui-kit/react-native/react-native-conversation.mdx`, `react-native-one-to-one-chat.mdx`, `react-native-tab-based-chat.mdx`, their `expo-*.mdx` equivalents, and the `examples/SampleApp/` + `examples/SampleAppExpo/` sample apps.
|
|
21
|
+
Ground truth: `docs/ui-kit/react-native/react-native-conversation.mdx`, `react-native-one-to-one-chat.mdx`, `react-native-tab-based-chat.mdx`, their `expo-*.mdx` equivalents, and the `examples/SampleApp/` + `examples/SampleAppExpo/` sample apps. **Official docs:** https://www.cometchat.com/docs/ui-kit/react-native/overview · **Docs MCP:** `claude mcp add --transport http cometchat-docs https://www.cometchat.com/docs/mcp` (or fetch the URL directly without MCP).
|
|
23
22
|
|
|
24
23
|
**Read `cometchat-native-core` and `cometchat-native-components` before this skill** — the provider wrapper chain and component catalog are prerequisites.
|
|
25
24
|
|
|
@@ -155,7 +154,7 @@ export function ConversationsScreen({ navigation }: { navigation: NativeStackNav
|
|
|
155
154
|
|
|
156
155
|
```tsx
|
|
157
156
|
// MessagesScreen.tsx
|
|
158
|
-
import { View } from "react-native";
|
|
157
|
+
import { Platform, View } from "react-native";
|
|
159
158
|
import {
|
|
160
159
|
CometChatMessageHeader,
|
|
161
160
|
CometChatMessageList,
|
|
@@ -168,7 +167,11 @@ export function MessagesScreen({ route, navigation }: any) {
|
|
|
168
167
|
<View style={{ flex: 1 }}>
|
|
169
168
|
<CometChatMessageHeader user={user} group={group} onBack={() => navigation.goBack()} showBackButton />
|
|
170
169
|
<CometChatMessageList user={user} group={group} hideReplyInThreadOption />
|
|
171
|
-
<CometChatMessageComposer
|
|
170
|
+
<CometChatMessageComposer
|
|
171
|
+
user={user}
|
|
172
|
+
group={group}
|
|
173
|
+
keyboardAvoidingViewProps={Platform.OS === "android" ? {} : { behavior: "padding" }}
|
|
174
|
+
/>
|
|
172
175
|
</View>
|
|
173
176
|
);
|
|
174
177
|
}
|
|
@@ -176,13 +179,19 @@ export function MessagesScreen({ route, navigation }: any) {
|
|
|
176
179
|
|
|
177
180
|
```tsx
|
|
178
181
|
// AppNavigator.tsx
|
|
182
|
+
import { NavigationContainer } from "@react-navigation/native";
|
|
179
183
|
import { createNativeStackNavigator } from "@react-navigation/native-stack";
|
|
180
184
|
const Stack = createNativeStackNavigator();
|
|
181
185
|
|
|
182
|
-
<Stack.Navigator
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
+
// The <Stack.Navigator> MUST be wrapped in <NavigationContainer> (react-navigation
|
|
187
|
+
// throws "Couldn't find a navigation object" at runtime without it). One container
|
|
188
|
+
// per app, at the root.
|
|
189
|
+
<NavigationContainer>
|
|
190
|
+
<Stack.Navigator screenOptions={{ headerShown: false }}>
|
|
191
|
+
<Stack.Screen name="Conversations" component={ConversationsScreen} />
|
|
192
|
+
<Stack.Screen name="Messages" component={MessagesScreen} />
|
|
193
|
+
</Stack.Navigator>
|
|
194
|
+
</NavigationContainer>
|
|
186
195
|
```
|
|
187
196
|
|
|
188
197
|
### Pattern B — Single thread (no conversation list)
|
|
@@ -220,7 +229,7 @@ export function SupportChatScreen() {
|
|
|
220
229
|
|
|
221
230
|
- The screen is wrapped in a `<View style={{ flex: 1 }}>` so the composer sits at the bottom and the list fills the middle.
|
|
222
231
|
- `CometChatMessageHeader`'s `onBack` should call `navigation.goBack()`. Set `showBackButton` explicitly so the header knows to render it.
|
|
223
|
-
- **Keyboard avoiding**:
|
|
232
|
+
- **Keyboard avoiding**: do **not** wrap Header/List/Composer in an external `KeyboardAvoidingView`. The kit composer owns keyboard avoidance via its own `keyboardAvoidingViewProps` — pass `keyboardAvoidingViewProps={Platform.OS === 'android' ? {} : { behavior: 'padding' }}` on `<CometChatMessageComposer>` (this is what the kit sample app does). Android relies on the standard `android:windowSoftInputMode="adjustResize"` in the manifest, not the prop.
|
|
224
233
|
|
|
225
234
|
---
|
|
226
235
|
|
|
@@ -452,7 +461,7 @@ export function ProductDetailScreen({ product }: any) {
|
|
|
452
461
|
|
|
453
462
|
- **Fixed height required.** CometChat components fill 100% of their parent. If you put them inside a `ScrollView` without a bounded height, the list collapses to zero height. Wrap in a `<View style={{ height: NNN }}>` or flex container with an explicit height.
|
|
454
463
|
- **Scroll conflict.** If the parent is a `ScrollView`, the message list's internal scroll competes with the parent's scroll. Consider the single-thread-as-stack-screen pattern instead if the chat is a primary UX.
|
|
455
|
-
- **Composer focus.** When the user taps the composer, the keyboard rises and can push the embedded chat off-screen on iOS. `keyboardShouldPersistTaps="handled"` on the parent ScrollView
|
|
464
|
+
- **Composer focus.** When the user taps the composer, the keyboard rises and can push the embedded chat off-screen on iOS. Set `keyboardShouldPersistTaps="handled"` on the parent ScrollView, and let the kit composer handle avoidance via `keyboardAvoidingViewProps={Platform.OS === 'android' ? {} : { behavior: 'padding' }}` — don't add your own root `KeyboardAvoidingView`.
|
|
456
465
|
|
|
457
466
|
Usually the embedded pattern is the wrong default — prefer a Modal or BottomSheet trigger from a button on the screen, which gives users a dedicated surface for chatting.
|
|
458
467
|
|
|
@@ -3,7 +3,6 @@ name: cometchat-native-production
|
|
|
3
3
|
description: "Production-readiness for React Native — server-minted auth tokens, user management CRUD, external-backend recipes (Express / Hono / Firebase Functions / Vercel Serverless). RN has no API routes, so the backend is always external."
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "Node.js >=18; React Native >=0.70; @cometchat/chat-uikit-react-native ^5"
|
|
6
|
-
allowed-tools: "shell, file-read, file-search, file-list, ask-user"
|
|
7
6
|
metadata:
|
|
8
7
|
author: "CometChat"
|
|
9
8
|
version: "3.0.0"
|
|
@@ -23,7 +22,7 @@ Teaches Claude how to move a React Native CometChat integration from dev-mode Au
|
|
|
23
22
|
|
|
24
23
|
**Read `cometchat-native-core` first** (init/login/wrapper chain) before this skill — production just swaps one prop on the provider, but understanding the provider lifecycle is the prerequisite.
|
|
25
24
|
|
|
26
|
-
Ground truth: `docs/ui-kit/react-native/methods.mdx`, and the cross-platform REST API at `https://{APP_ID}.api-{REGION}.cometchat.io/v3/`.
|
|
25
|
+
Ground truth: `docs/ui-kit/react-native/methods.mdx`, and the cross-platform REST API at `https://{APP_ID}.api-{REGION}.cometchat.io/v3/`. **Official docs:** https://www.cometchat.com/docs/fundamentals/user-auth · **Docs MCP:** `claude mcp add --transport http cometchat-docs https://www.cometchat.com/docs/mcp` (or fetch the URL directly without MCP).
|
|
27
26
|
|
|
28
27
|
---
|
|
29
28
|
|
|
@@ -253,7 +252,14 @@ let initialized = false;
|
|
|
253
252
|
let loginInFlight: Promise<unknown> | null = null;
|
|
254
253
|
|
|
255
254
|
async function ensureLoggedIn(authToken?: string, uid?: string): Promise<void> {
|
|
256
|
-
|
|
255
|
+
// getLoggedInUser() THROWS { code: "NOT_FOUND" } when there's no session — it does NOT
|
|
256
|
+
// return null. An uncaught throw here leaves the app stuck on splash (see core §2/§6).
|
|
257
|
+
let existing;
|
|
258
|
+
try {
|
|
259
|
+
existing = await CometChatUIKit.getLoggedInUser();
|
|
260
|
+
} catch (e: any) {
|
|
261
|
+
if (e?.code !== "NOT_FOUND") throw e; // no-session is the expected first-run path
|
|
262
|
+
}
|
|
257
263
|
if (existing) return;
|
|
258
264
|
if (loginInFlight) {
|
|
259
265
|
await loginInFlight;
|
|
@@ -3,7 +3,6 @@ name: cometchat-native-push
|
|
|
3
3
|
description: "Push notifications for React Native CometChat — APNs + FCM setup, dashboard provider configuration, client registration, token lifecycle, foreground display, background wake, tap-to-deep-link, and the Expo Go / APNs-environment traps that silently break production."
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "Node.js >=18; React Native >=0.70; @cometchat/chat-uikit-react-native ^5; @cometchat/chat-sdk-react-native ^4; @react-native-firebase/messaging ^18"
|
|
6
|
-
allowed-tools: "shell, file-read, file-search, file-list"
|
|
7
6
|
metadata:
|
|
8
7
|
author: "CometChat"
|
|
9
8
|
version: "3.0.0"
|
|
@@ -112,6 +111,8 @@ The p8 auth key you generated in 3a works for **both** environments. But CometCh
|
|
|
112
111
|
|
|
113
112
|
This JSON file is what CometChat's dashboard needs.
|
|
114
113
|
|
|
114
|
+
> **Coexistence check first (P0-10).** If `detect` reported `coexistence.existing_firebase: true` (a `firebase` / `@react-native-firebase/*` dep, an existing `google-services.json`, or a `GoogleService-Info.plist`), the app already uses Firebase. Reuse that **same** Firebase project + config files — don't add a second `google-services.json`/`initializeApp` or a duplicate `@react-native-firebase/app` plugin entry, which causes "Default FirebaseApp is not initialized" / duplicate-plugin prebuild failures. If a competing push provider (e.g. OneSignal) was listed in `coexistence.competing_sdks`, confirm with the user whether both should register for notifications before wiring CometChat's token registration — two providers fighting over the device token leads to dropped notifications.
|
|
115
|
+
|
|
115
116
|
### 4b. Add Android app to Firebase + download google-services.json
|
|
116
117
|
|
|
117
118
|
1. Project Overview → **Add app** → Android
|
|
@@ -3,7 +3,6 @@ name: cometchat-native-testing
|
|
|
3
3
|
description: "Testing patterns for CometChat React Native — Jest + React Native Testing Library setup, mocking the UI Kit + SDK, testing custom bubbles / headers / composer actions, snapshot pitfalls, E2E with Detox vs Maestro, and CI integration. Covers what to test vs what to skip."
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "Node.js >=18; React Native >=0.70; @cometchat/chat-uikit-react-native ^5; Jest ^29; @testing-library/react-native ^12"
|
|
6
|
-
allowed-tools: "shell, file-read, file-search, file-list"
|
|
7
6
|
metadata:
|
|
8
7
|
author: "CometChat"
|
|
9
8
|
version: "3.0.0"
|
|
@@ -21,7 +20,7 @@ Teaches Claude how to write and run tests against a CometChat React Native integ
|
|
|
21
20
|
- E2E with Detox (iOS + Android native drivers) vs Maestro (declarative YAML)
|
|
22
21
|
- Which tests catch real regressions vs which are flaky churn
|
|
23
22
|
|
|
24
|
-
Ground truth: `@cometchat/chat-uikit-react-native@5.3.3`'s example jest config (`examples/SampleAppWithPushNotifications/jest.config.js`) and the standard RN testing toolkit docs (callstack.github.io/react-native-testing-library, wix.github.io/Detox, maestro.mobile.dev).
|
|
23
|
+
Ground truth: `@cometchat/chat-uikit-react-native@5.3.3`'s example jest config (`examples/SampleAppWithPushNotifications/jest.config.js`) and the standard RN testing toolkit docs (callstack.github.io/react-native-testing-library, wix.github.io/Detox, maestro.mobile.dev). **Official docs:** https://www.cometchat.com/docs/ui-kit/react-native/overview · **Docs MCP:** `claude mcp add --transport http cometchat-docs https://www.cometchat.com/docs/mcp` (or fetch the URL directly without MCP).
|
|
25
24
|
|
|
26
25
|
---
|
|
27
26
|
|
|
@@ -3,7 +3,6 @@ name: cometchat-native-theming
|
|
|
3
3
|
description: "CometChatThemeProvider + CometChatI18nProvider — color tokens, typography, dark mode, per-component style overrides, and localization (18 built-in languages + custom translations). The JS theme object replaces CSS variables."
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "Node.js >=18; React Native >=0.70; @cometchat/chat-uikit-react-native ^5"
|
|
6
|
-
allowed-tools: "shell, file-read, file-search, file-list, ask-user"
|
|
7
6
|
metadata:
|
|
8
7
|
author: "CometChat"
|
|
9
8
|
version: "3.0.0"
|
|
@@ -16,7 +15,7 @@ Teaches Claude how to theme and localize the React Native UI Kit via `CometChatT
|
|
|
16
15
|
|
|
17
16
|
**Read `cometchat-native-core` first** (the wrapper chain that includes `CometChatThemeProvider`) before this skill. `cometchat-native-components` § 13 covers per-component `style={}` overrides, which are a sibling concern to theming.
|
|
18
17
|
|
|
19
|
-
Ground truth: `docs/ui-kit/react-native/theme.mdx`, `colors.mdx`, `component-styling.mdx`, `message-bubble-styling.mdx`, and `packages/ChatUiKit/src/theme/type.ts` (the canonical type definitions).
|
|
18
|
+
Ground truth: `docs/ui-kit/react-native/theme.mdx`, `colors.mdx`, `component-styling.mdx`, `message-bubble-styling.mdx`, and `packages/ChatUiKit/src/theme/type.ts` (the canonical type definitions). **Official docs:** https://www.cometchat.com/docs/ui-kit/react-native/overview · **Docs MCP:** `claude mcp add --transport http cometchat-docs https://www.cometchat.com/docs/mcp` (or fetch the URL directly without MCP).
|
|
20
19
|
|
|
21
20
|
---
|
|
22
21
|
|
|
@@ -308,10 +307,18 @@ The theme has a `typography` block with tokens per role:
|
|
|
308
307
|
theme={{
|
|
309
308
|
light: {
|
|
310
309
|
typography: {
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
310
|
+
fontFamily: "Inter", // flat string — the global family
|
|
311
|
+
// Every role EXCEPT `fontFamily`/`link` is a variant object with
|
|
312
|
+
// `bold` / `medium` / `regular`, each an RN TextStyle:
|
|
313
|
+
heading1: {
|
|
314
|
+
bold: { fontFamily: "Inter-Bold", fontSize: 28, fontWeight: "700" },
|
|
315
|
+
medium: { fontFamily: "Inter-SemiBold", fontSize: 28, fontWeight: "600" },
|
|
316
|
+
regular: { fontFamily: "Inter-Regular", fontSize: 28, fontWeight: "400" },
|
|
317
|
+
},
|
|
318
|
+
body: {
|
|
319
|
+
regular: { fontFamily: "Inter-Regular", fontSize: 15 },
|
|
320
|
+
},
|
|
321
|
+
link: { fontFamily: "Inter-Regular", fontSize: 15 }, // `link` is a flat TextStyle
|
|
315
322
|
// ... etc
|
|
316
323
|
},
|
|
317
324
|
},
|
|
@@ -319,7 +326,7 @@ The theme has a `typography` block with tokens per role:
|
|
|
319
326
|
>
|
|
320
327
|
```
|
|
321
328
|
|
|
322
|
-
Common tokens: `heading1`, `heading2`, `heading3`, `heading4`, `
|
|
329
|
+
Common tokens: `title`, `heading1`, `heading2`, `heading3`, `heading4`, `body`, `caption1`, `caption2`, `button` (there is NO `body1/body2/button1/button2`). Each of these is a **variant object** `{ bold, medium, regular }` where each weight is an RN `TextStyle` (`fontFamily`, `fontSize`, `fontWeight`, `lineHeight`, `letterSpacing`). The two exceptions — `fontFamily` and `link` — are flat (a string and a single `TextStyle` respectively).
|
|
323
330
|
|
|
324
331
|
### Custom font setup
|
|
325
332
|
|
|
@@ -345,18 +352,17 @@ Beyond color / typography, the theme has per-component style blocks for fine con
|
|
|
345
352
|
containerStyle: { backgroundColor: "#FAFAFA" },
|
|
346
353
|
},
|
|
347
354
|
messageHeaderStyles: {
|
|
348
|
-
|
|
355
|
+
titleTextStyle: { fontSize: 18 }, // key is titleTextStyle, NOT titleStyle
|
|
349
356
|
},
|
|
350
357
|
messageListStyles: {
|
|
351
358
|
containerStyle: { padding: 8 },
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
},
|
|
359
|
+
// Bubble styling is NESTED — the keys are `incomingMessageBubbleStyles`
|
|
360
|
+
// and `outgoingMessageBubbleStyles` (each a DeepPartial<BubbleStyles>
|
|
361
|
+
// with `containerStyle`/`textBubbleStyles`/… — there is no flat
|
|
362
|
+
// `sendBubbleStyle`/`receiveBubbleStyle` with backgroundColor+textStyle).
|
|
363
|
+
// For simple bubble color changes, prefer the color tokens in §7
|
|
364
|
+
// (sendBubbleBackground / receiveBubbleBackground) — cleaner than the
|
|
365
|
+
// per-component bubble blocks.
|
|
360
366
|
},
|
|
361
367
|
messageComposerStyles: {
|
|
362
368
|
containerStyle: { backgroundColor: "#FFF", borderTopWidth: 1, borderTopColor: "#E8E8E8" },
|
|
@@ -366,7 +372,7 @@ Beyond color / typography, the theme has per-component style blocks for fine con
|
|
|
366
372
|
>
|
|
367
373
|
```
|
|
368
374
|
|
|
369
|
-
Common component-style keys: `conversationStyles`, `
|
|
375
|
+
Common component-style keys (exact names from `theme/type.ts`): `conversationStyles`, `userStyles`, `groupStyles`, `groupMemberStyle` (singular "Member" + singular "Style"), `messageHeaderStyles`, `messageListStyles`, `messageComposerStyles`, `threadHeaderStyles`, `callButtonStyles` (no "s" after "Button"), `callLogsStyles`. Note the irregular pluralization — `userStyles`/`groupStyles` are singular-noun, and `groupMemberStyle`/`callButtonStyles` don't follow the `*Styles` pattern.
|
|
370
376
|
|
|
371
377
|
Each block has the same nested shape as the component's `style` prop (see `cometchat-native-components` § 13).
|
|
372
378
|
|
|
@@ -436,17 +442,18 @@ Overriding the bubble tokens directly is cleaner than doing it via `messageListS
|
|
|
436
442
|
<CometChatThemeProvider
|
|
437
443
|
theme={{
|
|
438
444
|
light: {
|
|
445
|
+
// Roles: title, heading1-4, body, caption1, caption2, button (NO body1/body2/button1/button2).
|
|
446
|
+
// Each role is a VARIANT object { bold, medium, regular } — not a flat { fontFamily }.
|
|
447
|
+
// Verified vs uikit-react-native-v5 theme/default/typography.ts.
|
|
439
448
|
typography: {
|
|
440
|
-
heading1: { fontFamily: "Inter-Bold" },
|
|
441
|
-
heading2: { fontFamily: "Inter-SemiBold" },
|
|
442
|
-
heading3: { fontFamily: "Inter-SemiBold" },
|
|
443
|
-
heading4: { fontFamily: "Inter-Medium" },
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
button1: { fontFamily: "Inter-SemiBold" },
|
|
449
|
-
button2: { fontFamily: "Inter-Medium" },
|
|
449
|
+
heading1: { bold: { fontFamily: "Inter-Bold" } },
|
|
450
|
+
heading2: { bold: { fontFamily: "Inter-SemiBold" } },
|
|
451
|
+
heading3: { medium: { fontFamily: "Inter-SemiBold" } },
|
|
452
|
+
heading4: { medium: { fontFamily: "Inter-Medium" } },
|
|
453
|
+
body: { regular: { fontFamily: "Inter-Regular" } },
|
|
454
|
+
caption1: { regular: { fontFamily: "Inter-Regular" } },
|
|
455
|
+
caption2: { regular: { fontFamily: "Inter-Regular" } },
|
|
456
|
+
button: { medium: { fontFamily: "Inter-Medium" } },
|
|
450
457
|
},
|
|
451
458
|
},
|
|
452
459
|
}}
|
|
@@ -467,8 +474,9 @@ function CustomTitle({ user }: any) {
|
|
|
467
474
|
return (
|
|
468
475
|
<Text style={{
|
|
469
476
|
color: theme.color.textPrimary,
|
|
470
|
-
|
|
471
|
-
|
|
477
|
+
// heading3 is a variant object — read a weight (regular/medium/bold):
|
|
478
|
+
fontFamily: theme.typography.heading3.regular.fontFamily,
|
|
479
|
+
fontSize: theme.typography.heading3.regular.fontSize,
|
|
472
480
|
}}>
|
|
473
481
|
{user.getName()}
|
|
474
482
|
</Text>
|
|
@@ -597,6 +605,23 @@ Calling `useCometChatTranslation()` from a component rendered OUTSIDE `CometChat
|
|
|
597
605
|
|
|
598
606
|
---
|
|
599
607
|
|
|
608
|
+
## Sound Manager — custom notification & call sounds
|
|
609
|
+
|
|
610
|
+
Sounds are a **behavioral** customization (not styling) — driven by `CometChatSoundManager`, exported from the kit. The UI Kit plays the built-in cues automatically; use this to override or trigger them. Sound-event keys are passed as strings. (Docs: ui-kit/react-native/sound-manager.)
|
|
611
|
+
|
|
612
|
+
```tsx
|
|
613
|
+
import { CometChatSoundManager } from "@cometchat/chat-uikit-react-native";
|
|
614
|
+
|
|
615
|
+
// Play a default cue — keys: incomingMessage | incomingMessageFromOther
|
|
616
|
+
// | outgoingMessage | incomingCall | outgoingCall
|
|
617
|
+
CometChatSoundManager.play("incomingMessage");
|
|
618
|
+
|
|
619
|
+
// Stop whatever is playing
|
|
620
|
+
CometChatSoundManager.pause();
|
|
621
|
+
```
|
|
622
|
+
|
|
623
|
+
> RN audio assets differ from web URLs — for custom sounds, follow the per-platform asset guidance in ui-kit/react-native/sound-manager rather than passing a web URL.
|
|
624
|
+
|
|
600
625
|
## 10. Anti-patterns
|
|
601
626
|
|
|
602
627
|
1. **Don't pass non-hex colors.** `"rgb(...)"`, `"rgba(...)"`, named colors, or `hsl(...)` will break the kit's internal color math (used to derive `extendedPrimary`). Use `"#RRGGBB"` or `"#RRGGBBAA"` (opacity via alpha).
|
|
@@ -3,7 +3,6 @@ name: cometchat-native-troubleshooting
|
|
|
3
3
|
description: "Diagnose CometChat React Native UI Kit integration failures — init/login, gesture handler, pod install, iOS privacy manifest, Android Maven, Metro cache, permissions, calls, extensions, v4-to-v5 upgrade. For push-specific symptoms see cometchat-native-push § 12."
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "Node.js >=18; React Native >=0.70; @cometchat/chat-uikit-react-native ^5"
|
|
6
|
-
allowed-tools: "shell, file-read, file-search, file-list, ask-user"
|
|
7
6
|
metadata:
|
|
8
7
|
author: "CometChat"
|
|
9
8
|
version: "3.0.0"
|
|
@@ -16,7 +15,7 @@ Teaches Claude how to diagnose and fix CometChat React Native integration failur
|
|
|
16
15
|
|
|
17
16
|
**Read `cometchat-native-core` first** — most "why doesn't this work" issues trace to the init/login/wrapper chain explained there.
|
|
18
17
|
|
|
19
|
-
Ground truth: `docs/ui-kit/react-native/troubleshooting.mdx`, `apple-privacy-manifest-guide.mdx`, `upgrading-from-v4.mdx`, and first-hand failure modes from real integrations.
|
|
18
|
+
Ground truth: `docs/ui-kit/react-native/troubleshooting.mdx`, `apple-privacy-manifest-guide.mdx`, `upgrading-from-v4.mdx`, and first-hand failure modes from real integrations. **Official docs:** https://www.cometchat.com/docs/ui-kit/react-native/overview · **Docs MCP:** `claude mcp add --transport http cometchat-docs https://www.cometchat.com/docs/mcp` (or fetch the URL directly without MCP).
|
|
20
19
|
|
|
21
20
|
---
|
|
22
21
|
|
|
@@ -90,6 +89,9 @@ done
|
|
|
90
89
|
|
|
91
90
|
Missing peer deps → install + `pod install` (bare) or `expo install` (Expo) + rebuild.
|
|
92
91
|
|
|
92
|
+
> ⚠️ **`--legacy-peer-deps` silently DROPS peers.** If the project installed with `npm install --legacy-peer-deps` (common to dodge RN peer-range conflicts), npm **skips** unmet peer deps instead of erroring — you get a "successful" install with `react-native-svg` / `gesture-handler` / `safe-area-context` / async-storage missing, then a runtime crash. Re-run the check above after any `--legacy-peer-deps` install and install the missing ones **explicitly**.
|
|
93
|
+
> ⚠️ **`@cometchat/calls-lib-webrtc` is Cloudsmith-only — NOT on npm** (`npm view @cometchat/calls-lib-webrtc` → 404, verified). If a calls install fails resolving it, add the Cloudsmith tarball/registry per `cometchat-native-calls`; a plain `npm install @cometchat/calls-lib-webrtc` will never work.
|
|
94
|
+
|
|
93
95
|
---
|
|
94
96
|
|
|
95
97
|
## 2. Symptom → fix lookup tables
|
|
@@ -152,6 +154,9 @@ Quick-reference tables. Work through in order; if none match, drop into § 3 dee
|
|
|
152
154
|
| Fast Refresh doesn't pick up new deps | Native dep change (requires rebuild) | Restart Metro + rebuild (iOS/Android) |
|
|
153
155
|
| "Maximum update depth exceeded" after theme change | Theme object recreated each render | Define theme at module scope or in `useMemo(() => ..., [])` |
|
|
154
156
|
| App crashes on first JS load | Entry file error (syntax or import order) | Check `index.js` — `react-native-gesture-handler` should be line 1 |
|
|
157
|
+
| Unhandled promise rejection at startup with `id=0` / module-load TypeError, but chat + calls work fine | Known non-blocking init artifact from the kit/calls-sdk module-level code (F77); source-map unresolvable | **Non-blocking — do NOT chase it.** Chat and calls are fully functional. Documented as a known v4.x artifact. Don't refactor user code to "fix" it. |
|
|
158
|
+
| Error banner shows literal `[object Object]` instead of a message | `setError(String(e))` / `setError(\`${e}\`)` — CometChatException stringifies to `[object Object]` | Use `e.message` (or a `formatCometChatError(e)` helper): `setError(e?.message ?? String(e))`. |
|
|
159
|
+
| (Expo) Credentials/config changes don't take effect after editing app config | `expo.extra` manifest is **cached** | Restart with `npx expo start --clear`; for a dev build, rebuild. The `expo.extra` block is baked into the manifest at build/start time. |
|
|
155
160
|
|
|
156
161
|
### 2f. Theming
|
|
157
162
|
|
|
@@ -460,7 +465,8 @@ cd ios && pod install && cd ..
|
|
|
460
465
|
|
|
461
466
|
If none of the lookup tables or deep dives apply:
|
|
462
467
|
|
|
463
|
-
1. **
|
|
468
|
+
1. **Run `cometchat doctor`** (the structured first pass — combines detect + info + verify + known-issue matching). Start here; it often pinpoints the layer (state / drift / env / deps) before you read logs.
|
|
469
|
+
2. **Read the raw error.** RN errors are usually specific ("Module 'X' not found in app 'Y'" is different from "TurboModuleRegistry.getEnforcing").
|
|
464
470
|
2. **Check the dev console + native logs.** For iOS: Xcode → View → Debug Area → Activate Console. For Android: `adb logcat | grep -E "cometchat|CometChat|ReactNative"`.
|
|
465
471
|
3. **Search the upstream docs MCP** (`cometchat-docs` if installed).
|
|
466
472
|
4. **Search the sample app** (`examples/SampleApp/` or `examples/SampleAppExpo/`) for a working version of the pattern the user is trying.
|