Skip to content

docs(rn): unify React Native push notifications into a single guide - #486

Open
suraj-chauhan-cometchat wants to merge 6 commits into
mainfrom
docs/rn-push-notifications-unified
Open

suraj-chauhan-cometchat wants to merge 6 commits into
mainfrom
docs/rn-push-notifications-unified

Conversation

@suraj-chauhan-cometchat

Copy link
Copy Markdown
Contributor

What

Replaces the split React Native (Android) and React Native (iOS) push guides with a single unified guide at notifications/react-native-push-notifications.mdx, documenting the JS-first @cometchat/push-notifications-react-native package.

Mirrors the Flutter restructure in #440.

Why

The RN push story is now one drop-in package (FCM on Android, APNs + PushKit/VoIP on iOS) with a JS-first design — native only shows UI and captures tokens; every CometChat action (register token, accept/reject/end call) runs in JS through the Chat SDK the app already ships. A single guide reflects that instead of two platform-split pages that duplicated setup.

Changes

  • Add notifications/react-native-push-notifications.mdx — unified guide: credentials, package install + platform config (npx cometchat-pn setup for iOS PushKit; zero app-side code on Android), init after login, permissions/tokens, notification taps + call events, killed-state decline via registerBackgroundCallTask, Android OEM permissions, badges, testing checklist, troubleshooting.
  • Delete notifications/react-native-push-notifications-android.mdx and -ios.mdx.
  • docs.json — collapse the two nav entries into one; redirect the old split paths (and /extensions/react-native-push-notifications) to the unified page.
  • Repoint cross-links in notifications.mdx, notifications/push-overview.mdx, calls/v4/react-native/overview.mdx, and sdk/react-native/push-notification-html-stripping.mdx.

Every code sample, config field, method name, provider-platform value, CLI command, and native setup step was verified against the shipped package source and the reference master-app integration.

🤖 Generated with Claude Code

Replace the split android/ios RN push guides with one unified
notifications/react-native-push-notifications.mdx documenting the
JS-first @cometchat/push-notifications-react-native package (FCM +
APNs/VoIP, CallKit/lock-screen call UI, killed-state handling).

Mirrors the Flutter restructure (#440):
- delete react-native-push-notifications-{android,ios}.mdx
- docs.json: collapse the two nav entries into one; redirect the old
  split paths (and /extensions/... ) to the unified page
- repoint cross-links in notifications.mdx, push-overview.mdx,
  calls/v4/react-native/overview.mdx, and the SDK html-stripping guide

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@mintlify

mintlify Bot commented Aug 28, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
cometchat 🟢 Ready View Preview Aug 28, 2026, 7:09 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

The push-getting-started page is introduced by the still-open Flutter PR
#440; until it merges, link the shared setup prerequisite
to the existing notifications/push-overview page so the RN guide has no
dead links on main.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Matches the convention used across the React Native UI Kit pages: a
machine-readable Field/Value table in an accordion directly after the
frontmatter, so agents and skills can generate correct typed code
without inferring the API from prose.

Covers the surface the narrative guide left implicit: exported type
names and their union values, the full PNConfiguration defaults, the
complete PNCallInfo / PNNotificationTapInfo / PNCallEndEvent field
lists, dispose(), isCometChatNotification(), the cold-start replay
behaviour, and the Android permission set. Generated from the package
type definitions.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…isterPushOnLogout

Android and iOS both document this as a dedicated numbered step titled
'Unregister the token on logout'. The RN guide had it buried inside the
token-registration step under an invented name (teardownPush), so align
it: own section 5, house-style name, remaining sections renumbered and
the troubleshooting cross-reference updated.

Keeps the unsubscribe step (which the other platforms don't need) and
now says why: the package holds callbacks in a set that survives
unregister(), so skipping it double-fires handlers after a re-login.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Pairs with unregisterPushOnLogout, so both names state when to call
them. Matches the reference app, which uses the same two names.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The reference still said 'Teardown' and named neither function, so it
disagreed with the 'Unregister the token on logout' section and the
reference app. Name setupPushOnLogin / unregisterPushOnLogout in the
Initialize and logout rows so an agent reading only the accordion
generates the same names the guide and sample app use.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant