AGENT SKILL

cometchat-react-native-expo-patterns

Expo-specific wiring for the CometChat React Native UI Kit v5 — why Expo Go cannot work, development builds, app.json permissions, and the Expo-only extra dependency. Triggers: CometChat in Expo, Expo chat app, expo development build CometChat, Expo Go chat not working, expo run ios CometChat.

使用场景前端开发
License 许可
MIT
最近更新
2026-11-13
Stars
★ 1.6k
Forks
483

01 前言 Front Matter

name
cometchat-react-native-expo-patterns
license
MIT
metadata
{ "tags": "chat cometchat react-native expo development-build app-json permissions", "author": "CometChat", "version": "1.0.0" }
description
Expo-specific wiring for the CometChat React Native UI Kit v5 — why Expo Go cannot work, development builds, app.json permissions, and the Expo-only extra dependency. Triggers: CometChat in Expo, Expo chat app, expo development build CometChat, Expo Go chat not working, expo run ios CometChat.
compatibility
Expo SDK >=53 (development builds; ships React Native 0.79 — SDK 52 ships RN 0.76, below the pack's RN floor); React Native >=0.77; @cometchat/chat-uikit-react-native ^5.4.0

03 SKILL.md 正文

Ground truth: @cometchat/chat-uikit-react-native@5 + catalog rn-v5.json. Docs: /ui-kit/react-native/expo-integration · expo-conversation · expo-tab-based-chat.

Companion skills (read first)

  • cometchat-react-native-core — install, provider chain, init→login→render. Assumed, not repeated here.
  • cometchat-react-native-bare-patterns — the bare React Native CLI equivalent. Use that one, not this, for a non-Expo app.

Use this skill when

  • the project has app.json/app.config.js with an expo key, or expo in package.json
  • "add chat to my Expo app" · "chat isn't working in Expo Go"

Prerequisites & install

⚠️ Expo Go does not work — and this is the #1 support issue

The UI Kit ships custom native modules. Expo Go is a fixed prebuilt binary that cannot load them. There is no workaround, no config flag, and nothing to fix in code. You need a development build.

Symptom: the app runs in Expo Go but chat screens crash or render nothing, with a NativeModule error that names gesture-handler / svg / video rather than CometChat — so it reads as unrelated.

npx expo run:ios      # or: npx expo run:android

Both produce a development build. From then on use that build, not Expo Go.

Packages

Same list as bare RN, plus punycode, which is Expo-only:

npm install @cometchat/chat-uikit-react-native@5 @cometchat/chat-sdk-react-native@4
npm install @react-native-clipboard/clipboard \
  react-native-svg react-native-video react-native-localize react-native-gesture-handler \
  react-native-safe-area-context @react-native-async-storage/async-storage@^2.1.2 dayjs punycode

Native config lives in app.json — never in ios/ or android/

This is the whole Expo/bare divergence: Expo generates the native projects, so hand-editing Info.plist or AndroidManifest.xml is pointless — the next prebuild overwrites it. Declare permissions in app.json and let Expo write them:

{
  "expo": {
    "ios": {
      "infoPlist": {
        "NSCameraUsageDescription": "Camera access for video calls",
        "NSMicrophoneUsageDescription": "Microphone access for voice/video calls"
      }
    },
    "android": {
      "permissions": [
        "android.permission.INTERNET",
        "android.permission.CAMERA",
        "android.permission.MODIFY_AUDIO_SETTINGS",
        "android.permission.RECORD_AUDIO",
        "android.permission.ACCESS_NETWORK_STATE",
        "android.permission.BLUETOOTH_CONNECT",
        "android.permission.VIBRATE"
      ]
    }
  }
}
  • BLUETOOTH_CONNECT (Android 12+) lets calls route audio to a Bluetooth headset — /calls/react-native/setup lists it; the calls SDK's own manifest only merges the legacy BLUETOOTH.
  • No READ_/WRITE_EXTERNAL_STORAGE, though the expo-integration page lists them: they are no-ops on modern Android (WRITE from 11, READ from 13), and the UI Kit's own manifest already merges them for older devices.

After changing app.json, rebuild — a JS reload will not pick up a native permission change.

Calling on Expo

Calling adds native WebRTC, so it needs a fresh development build too:

npm install @cometchat/calls-sdk-react-native@5
# 6 REQUIRED peer deps — the calls SDK's declared peerDependencies. Pinned; do NOT float them.
npm install @react-native-async-storage/async-storage@^2.1.2 react-native-background-timer@^2.4.1 \
  react-native-performance@^5.1.2 react-native-svg@^15.12.0 react-native-url-polyfill@2.0.0 \
  react-native-webrtc@124.0.7
npx expo run:ios

⚠️ react-native-url-polyfill + react-native-performance are bundle-critical (the UIKit module-scope require()s the calls SDK, so Metro resolves its peers even in a chat-only build — a missing one fails the bundle). Keep react-native-performance on 5.x (a floated ^6 breaks every later npm install with ERESOLVE). @react-native-community/netinfo / react-native-callstats are NOT declared peers — do not add them.

Simulators cannot capture camera or microphone — verify calls on a real device.

What is the same as bare RN

Everything above the native layer: the provider chain, init → login → render, every component, theming, navigation. Only install and native config differ. Do not re-derive app code per toolchain.

Common pitfalls

  1. Testing in Expo Go — custom native modules cannot load. Development build, always.
  2. Editing ios/ or android/ directly — prebuild overwrites it. Use app.json.
  3. Forgetting punycode — Expo-only, and its absence surfaces as an unrelated module error.
  4. Reloading JS after an app.json change — native config needs a rebuild.
  5. Expecting calls to work on a simulator — no camera or mic capture.

Verify it works

  • The app runs from a development build, not Expo Go.
  • npm run verify:fences:rn-v5 is green.
  • On device: chat renders, the composer survives the keyboard, gestures respond, and — if calling is installed — the permission prompts appear on first call.

04 同仓库更多 Skills

hashgraph-online
hashgraph-online/awesome-codex-plugins

migrate-to-e2e

Moves an existing Playwright, Cypress, Selenium, Appium, Detox, Maestro, or TesterArmy suite to e2e one slice at a time, with the old suite running beside the new one until each ported test is proven. Keeps a MIGRATION.md progress file so any later session resumes where the last stopped. Optionally plants a defect to show both suites catch it. Use for /migrate-to-e2e, "migrate our tests to e2e", "port these Maestro flows", "move our TesterArmy tests", or when a project has an e2e config and an older suite still running.

★ 1.6k
hashgraph-online
hashgraph-online/awesome-codex-plugins

e2e

Writes, runs, and debugs end-to-end tests for web and mobile apps with e2e, the agentic test runner, which mixes agent.act goals with exact locator assertions on a Playwright browser or an iOS or Android device. Also drives a project's running app live over the e2e MCP server to look at a screen, check a UI change, take a screenshot or record a video, and try a locator; and runs bug bashes, parallel e2e explore runs with each bug proven by a repro test. Use when a project depends on e2e or has an e2e.config.ts, when asked for end-to-end, browser, mobile, or agentic UI tests, to check a change in the running app, to QA or bug bash an app or branch, or when an e2e run fails.

★ 1.6k
hashgraph-online
hashgraph-online/awesome-codex-plugins

create-verification-skill

Generate a project-local verify-<app> skill on top of e2e, so any coding agent can launch the app, check it is worth driving, exercise a feature the way a user does, keep evidence, and bug bash it. Writes the skill, a feature map with one explore charter per feature, and proves it once. Use for /create-verification-skill, "make a verification skill for this repo", or when a project has no scripted way to prove UI behavior.

★ 1.6k
hashgraph-online
hashgraph-online/awesome-codex-plugins

deja-search

deja-vu memory — search the user's past AI coding sessions with the deja CLI. Holds what they already settled and never wrote into the repo (naming rules, banned or already-tried tools, required checks before merge, preferred values, who owns what). Use before your first edit in a task, before you call a change done or ready to merge, before you recommend a tool, library, design or reviewer, before re-debugging an error that may already be solved, when they say 'didn't we fix this before', 'what did we decide about X' or 'I already have that', and before telling them something on this machine does not exist.

★ 1.6k
hashgraph-online
hashgraph-online/awesome-codex-plugins

deja-reflect

End-of-session reflection and memory curation with deja-vu. Review what was decided, what commands broke and what repaired them, and record durable project rules or decisions with deja remember so the next session starts with them.

★ 1.6k
hashgraph-online
hashgraph-online/awesome-codex-plugins

revid

Make, edit, export and post AI videos with Revid (revid.ai) through the Revid MCP server. Use whenever the user wants a short-form or long-form video made (from an idea, a script, a URL, an article, a PDF, a tweet, a product page, their own clips, or a song), wants to find what is going viral on TikTok, YouTube, Instagram or X before making something, wants to edit or re-export an existing Revid project, generate a standalone AI image or clip, make a series episode, or publish and schedule a finished video to connected social accounts. Covers setup (hosted MCP with OAuth, or an API key), the 36 tools, credits, polling and the rules for publishing. Routes to the more specific revid-* skills when one fits.

图像与多媒体Skill与智能体开发
★ 1.6k