diff --git a/docs.json b/docs.json
index 07637d35..d3b42726 100644
--- a/docs.json
+++ b/docs.json
@@ -5036,7 +5036,17 @@
"pages": [
"notifications/push-overview",
"notifications/push-integration",
- "notifications/push-customization"
+ "notifications/push-customization",
+ "notifications/android-push-notifications",
+ "notifications/android-push-notifications-updated",
+ "notifications/flutter-push-notifications-android",
+ "notifications/flutter-push-notifications-ios",
+ "notifications/react-native-push-notifications",
+ "notifications/react-native-push-notifications-updated",
+ "notifications/ios-fcm-push-notifications",
+ "notifications/ios-fcm-push-notifications-updated",
+ "notifications/ios-apns-push-notifications",
+ "notifications/ios-apns-push-notifications-updated"
]
},
{
diff --git a/images/firebase-push-notifications.png b/images/firebase-push-notifications.png
new file mode 100644
index 00000000..2187ffde
Binary files /dev/null and b/images/firebase-push-notifications.png differ
diff --git a/images/push-notifications-guide-1.png b/images/push-notifications-guide-1.png
new file mode 100644
index 00000000..86f69f53
Binary files /dev/null and b/images/push-notifications-guide-1.png differ
diff --git a/images/push-notifications-guide-2.png b/images/push-notifications-guide-2.png
new file mode 100644
index 00000000..48c6b220
Binary files /dev/null and b/images/push-notifications-guide-2.png differ
diff --git a/images/push-notifications-guide-3.png b/images/push-notifications-guide-3.png
new file mode 100644
index 00000000..a43dd6af
Binary files /dev/null and b/images/push-notifications-guide-3.png differ
diff --git a/images/push-notifications-guide-4.png b/images/push-notifications-guide-4.png
new file mode 100644
index 00000000..1a9a799d
Binary files /dev/null and b/images/push-notifications-guide-4.png differ
diff --git a/notifications/android-push-notifications-updated.mdx b/notifications/android-push-notifications-updated.mdx
new file mode 100644
index 00000000..81275bea
--- /dev/null
+++ b/notifications/android-push-notifications-updated.mdx
@@ -0,0 +1,302 @@
+---
+title: "Android Push Notifications (UI Kit)"
+description: ""
+---
+
+The Kotlin sample app already handles Firebase Messaging, grouped message notifications, inline replies, and native incoming-call UI via `ConnectionService`. Follow this guide to mirror that implementation in any Android app that uses CometChat UI Kit and Calls SDK.
+
+
+ Browse the Kotlin push-notification sample (UI Kit + Calls + VoIP/ConnectionService).
+
+
+
+Folder names in this guide match the sample repo (for example
+src/main/java/com/cometchat/sampleapp/kotlin/fcm,
+src/main/AndroidManifest.xml, or
+build.gradle).
+Copy the same structure into your app and only change identifiers (applicationId, package names, provider IDs) to match your project.
+
+
+## Architecture map
+
+| Sample path | Role | What to copy/replicate |
+| --- | --- | --- |
+| [`src/main/java/com/cometchat/sampleapp/kotlin/fcm`](https://github.com/cometchat/cometchat-uikit-android/tree/v5/sample-app-kotlin%2Bpush-notification/src/main/java/com/cometchat/sampleapp/kotlin/fcm) | FCM service, DTOs, notification builder, inline reply broadcast receiver | Copy the package; update package name and constants (`AppConstants.FCMConstants.PROVIDER_ID`, `AppCredentials`). |
+| [`src/main/java/com/cometchat/sampleapp/kotlin/fcm/voip`](https://github.com/cometchat/cometchat-uikit-android/tree/v5/sample-app-kotlin%2Bpush-notification/src/main/java/com/cometchat/sampleapp/kotlin/fcm/voip) | ConnectionService wrapper for full-screen incoming-call UI and busy rejection | Keep class names; make sure manifest points to `CometChatVoIPConnectionService`. |
+| [`src/main/java/com/cometchat/sampleapp/kotlin/fcm/utils/MyApplication.kt`](https://github.com/cometchat/cometchat-uikit-android/blob/v5/sample-app-kotlin%2Bpush-notification/src/main/java/com/cometchat/sampleapp/kotlin/fcm/utils/MyApplication.kt) | Initializes UI Kit, tracks foreground activity, manages call overlays, connects/disconnects websockets | Use this as your Application class; set it in `AndroidManifest.xml`. |
+| [`src/main/java/com/cometchat/sampleapp/kotlin/fcm/utils/AppUtils.kt`](https://github.com/cometchat/cometchat-uikit-android/blob/v5/sample-app-kotlin%2Bpush-notification/src/main/java/com/cometchat/sampleapp/kotlin/fcm/utils/AppUtils.kt) | Runtime permission helpers for notifications, media, mic/camera | Reuse the permission flow or mirror it if you already centralize permissions elsewhere. |
+| [`src/main/java/com/cometchat/sampleapp/kotlin/fcm/ui/activity/HomeActivity.kt`](https://github.com/cometchat/cometchat-uikit-android/blob/v5/sample-app-kotlin%2Bpush-notification/src/main/java/com/cometchat/sampleapp/kotlin/fcm/ui/activity/HomeActivity.kt) | Requests runtime permissions on launch and wires navigation into UI Kit | Copy the permission prompts and keep notification/call permissions in your entry flow. |
+| [`src/main/AndroidManifest.xml`](https://github.com/cometchat/cometchat-uikit-android/blob/v5/sample-app-kotlin%2Bpush-notification/src/main/AndroidManifest.xml) | Permissions, FCM service, broadcast receiver, ConnectionService declaration | Start from the sample manifest; keep the same permissions and services. |
+| [`build.gradle`](https://github.com/cometchat/cometchat-uikit-android/blob/v5/sample-app-kotlin%2Bpush-notification/build.gradle) | Plugins, Firebase + CometChat dependencies, compile/target SDK levels | Align plugin list, Kotlin JVM target, and dependencies before wiring code. |
+
+## 1. Prerequisites
+
+- Firebase project with an Android app added (package name matches your `applicationId`) and Cloud Messaging enabled; place `google-services.json` in `app/src/main` or `app/` per your Gradle setup.
+- CometChat app credentials (App ID, Region, Auth Key) and the **Push Notifications** extension enabled. Create an **FCM Android provider** and copy the provider ID.
+- Android Studio Giraffe+ with a physical Android device (minSdk 26 in the sample; ConnectionService requires API 26+).
+- Latest CometChat UI Kit + Calls SDK dependencies (see the sample Gradle snippet below) and Google Play Services on the device.
+
+## 2. Prepare credentials before coding
+
+### 2.1 Firebase Console
+
+1. Register your Android package name and download `google-services.json` into your module.
+2. Enable Cloud Messaging and keep the Server key handy if you want to send manual test pushes.
+
+
+
+
+
+### 2.2 CometChat dashboard
+
+1. Turn on the **Push Notifications** extension (V2).
+
+
+
+
+
+2. Create an FCM provider for Android and copy the generated provider ID.
+
+
+
+
+
+### 2.3 Local configuration files
+
+- [`AppCredentials.kt`](https://github.com/cometchat/cometchat-uikit-android/blob/v5/sample-app-kotlin%2Bpush-notification/src/main/java/com/cometchat/sampleapp/kotlin/fcm/AppCredentials.kt) should contain your App ID, Auth Key, and Region.
+- [`AppConstants.FCMConstants.PROVIDER_ID`](https://github.com/cometchat/cometchat-uikit-android/blob/v5/sample-app-kotlin%2Bpush-notification/src/main/java/com/cometchat/sampleapp/kotlin/fcm/utils/AppConstants.kt#L20) must be replaced with the provider ID you created for this app.
+- Replace launcher icons and app name in `AndroidManifest.xml` / `res` if you fork the sample.
+
+### 2.4 Push Notification extension settings (dashboard)
+
+- Set **Extension version** to `V2` (or `V1 & V2` while migrating legacy topic-based clients).
+- Select **Platforms** you want to support (Android, iOS, Web, etc.).
+- Configure **Payload trimming** options if your pushes risk exceeding the ~4 KB limit (remove sender/receiver metadata, message metadata, or trim text).
+- Toggle **Notification triggers** (messages, calls, groups) to match your app’s requirements.
+
+## 3. Project setup (Gradle + manifest)
+
+### 3.1 Gradle configuration
+
+Mirror the sample `build.gradle` plugins and dependencies:
+
+```gradle
+plugins {
+ alias(libs.plugins.android.application)
+ alias(libs.plugins.kotlin.android)
+ id "com.google.gms.google-services"
+}
+
+android {
+ compileSdk 35
+ defaultConfig {
+ applicationId "your.package.name"
+ minSdk 26
+ targetSdk 35
+ }
+ kotlinOptions { jvmTarget = "11" }
+}
+
+dependencies {
+ // CometChat
+ implementation "com.cometchat:chat-uikit:5.2.6" // match your repo version
+ implementation "com.cometchat:chat-sdk-android:4.1.8"
+ implementation "com.cometchat:calls-sdk-android:4.3.2"
+
+ // Firebase
+ implementation platform("com.google.firebase:firebase-bom:33.7.0")
+ implementation "com.google.firebase:firebase-messaging"
+ implementation "com.google.firebase:firebase-auth"
+
+ // UI + utilities
+ implementation "androidx.core:core-ktx:1.13.1"
+ implementation "androidx.appcompat:appcompat:1.7.0"
+ implementation "com.google.android.material:material:1.12.0"
+ implementation "com.google.code.gson:gson:2.11.0"
+ implementation "com.github.bumptech.glide:glide:4.16.0"
+}
+```
+
+- Apply the `google-services` plugin and place `google-services.json` in the same module as the `build.gradle` above.
+- Keep `viewBinding` enabled if you copy the UI Kit screens directly from the sample.
+
+
+Need a minimal copy/paste? Keep the links above for context, but at minimum drop these into `app/build.gradle`:
+
+```gradle
+plugins {
+ id "com.google.gms.google-services"
+}
+
+dependencies {
+ implementation "com.cometchat:chat-uikit:5.2.6"
+ implementation "com.cometchat:chat-sdk-android:4.1.8"
+ implementation "com.cometchat:calls-sdk-android:4.3.2"
+
+ implementation platform("com.google.firebase:firebase-bom:33.7.0")
+ implementation "com.google.firebase:firebase-messaging"
+ implementation "com.google.firebase:firebase-auth"
+}
+```
+
+
+### 3.2 Manifest permissions and components
+
+Start from the sample [`AndroidManifest.xml`](https://github.com/cometchat/cometchat-uikit-android/blob/v5/sample-app-kotlin%2Bpush-notification/src/main/AndroidManifest.xml):
+
+- Permissions for notifications and calls: `POST_NOTIFICATIONS`, `RECORD_AUDIO`, `CALL_PHONE`, `MANAGE_OWN_CALLS`, `ANSWER_PHONE_CALLS`, `WAKE_LOCK`, `READ_PHONE_STATE`, and media read permissions for attachments.
+- Set `android:name` on `` to your `MyApplication` subclass.
+- Declare:
+- `com.google.firebase.MESSAGING_EVENT` service: [`FCMService`](https://github.com/cometchat/cometchat-uikit-android/blob/v5/sample-app-kotlin%2Bpush-notification/src/main/java/com/cometchat/sampleapp/kotlin/fcm/fcm/FCMService.kt)
+- Reply receiver: [`FCMMessageBroadcastReceiver`](https://github.com/cometchat/cometchat-uikit-android/blob/v5/sample-app-kotlin%2Bpush-notification/src/main/java/com/cometchat/sampleapp/kotlin/fcm/fcm/FCMMessageBroadcastReceiver.kt)
+- VoIP connection service: [`CometChatVoIPConnectionService`](https://github.com/cometchat/cometchat-uikit-android/blob/v5/sample-app-kotlin%2Bpush-notification/src/main/java/com/cometchat/sampleapp/kotlin/fcm/voip/CometChatVoIPConnectionService.kt) with `android.permission.BIND_TELECOM_CONNECTION_SERVICE`.
+- Runtime permissions: follow [`AppUtils.kt`](https://github.com/cometchat/cometchat-uikit-android/blob/v5/sample-app-kotlin%2Bpush-notification/src/main/java/com/cometchat/sampleapp/kotlin/fcm/utils/AppUtils.kt) and [`HomeActivity.kt`](https://github.com/cometchat/cometchat-uikit-android/blob/v5/sample-app-kotlin%2Bpush-notification/src/main/java/com/cometchat/sampleapp/kotlin/fcm/ui/activity/HomeActivity.kt) for requesting notification/mic/camera/storage permissions early in the flow.
+
+
+Minimal manifest block to copy (keep the links above for full context):
+
+```xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+```
+
+
+## 4. Wire the Kotlin notification stack
+
+### 4.1 Token registration (after login)
+
+[`Repository.registerFCMToken`](https://github.com/cometchat/cometchat-uikit-android/blob/v5/sample-app-kotlin%2Bpush-notification/src/main/java/com/cometchat/sampleapp/kotlin/fcm/data/repository/Repository.kt#L548) fetches the FCM token and registers it with CometChat Push Notifications:
+
+```kotlin
+FirebaseMessaging.getInstance().token.addOnCompleteListener { task ->
+ if (task.isSuccessful) {
+ val token = task.result
+ CometChatNotifications.registerPushToken(
+ token,
+ PushPlatforms.FCM_ANDROID,
+ AppConstants.FCMConstants.PROVIDER_ID,
+ object : CometChat.CallbackListener() { /* handle callbacks */ }
+ )
+ }
+}
+```
+
+Call this after `CometChatUIKit.login()` succeeds (the sample triggers it during app bootstrap) and keep `unregisterPushToken` for logout flows.
+
+### 4.2 Handling message pushes
+
+- [`FCMService.onMessageReceived`](https://github.com/cometchat/cometchat-uikit-android/blob/v5/sample-app-kotlin%2Bpush-notification/src/main/java/com/cometchat/sampleapp/kotlin/fcm/fcm/FCMService.kt#L25) inspects `message.data["type"]`.
+- For `type == "chat"` it:
+ - Marks the message as delivered via `CometChat.markAsDelivered`.
+ - Skips notifications when the target chat is already open (`MyApplication.currentOpenChatId`).
+ - Builds grouped notifications with avatars and BigText via [`FCMMessageNotificationUtils`](https://github.com/cometchat/cometchat-uikit-android/blob/v5/sample-app-kotlin%2Bpush-notification/src/main/java/com/cometchat/sampleapp/kotlin/fcm/fcm/FCMMessageNotificationUtils.kt), including inline reply actions.
+- [`FCMMessageBroadcastReceiver`](https://github.com/cometchat/cometchat-uikit-android/blob/v5/sample-app-kotlin%2Bpush-notification/src/main/java/com/cometchat/sampleapp/kotlin/fcm/fcm/FCMMessageBroadcastReceiver.kt) captures inline replies, initializes the SDK headlessly (`SplashViewModel.initUIKit`), sends the message, and re-shows the updated notification.
+
+### 4.3 Navigation from notifications
+
+- Taps on a notification launch [`SplashActivity`](https://github.com/cometchat/cometchat-uikit-android/blob/v5/sample-app-kotlin%2Bpush-notification/src/main/java/com/cometchat/sampleapp/kotlin/fcm/ui/activity/SplashActivity.kt) which reads `NOTIFICATION_PAYLOAD` extras to decide whether to open `MessagesActivity` with the right user/group.
+- `MyApplication` keeps track of the foreground activity, reconnects websockets when the app resumes, and shows a top-of-screen incoming-call snackbar if a call arrives while the UI Kit is open.
+
+### 4.4 Incoming calls (ConnectionService)
+
+- For `type == "call"` pushes, `FCMService.handleCallFlow` parses [`FCMCallDto`](https://github.com/cometchat/cometchat-uikit-android/blob/v5/sample-app-kotlin%2Bpush-notification/src/main/java/com/cometchat/sampleapp/kotlin/fcm/fcm/FCMCallDto.kt) and routes to the `voip` package.
+- [`CometChatVoIP`](https://github.com/cometchat/cometchat-uikit-android/blob/v5/sample-app-kotlin%2Bpush-notification/src/main/java/com/cometchat/sampleapp/kotlin/fcm/voip/CometChatVoIP.kt) registers a `PhoneAccount` and triggers `TelecomManager.addNewIncomingCall` so Android shows the native full-screen call UI with Accept/Decline.
+- When the app is already on a call, the sample rejects new calls with a busy status (`Repository.rejectCallWithBusyStatus`).
+- Cancel/timeout pushes (`callAction == cancelled/unanswered`) end the active telecom call if the session IDs match.
+
+### 4.5 Notification UI polish
+
+- `FCMMessageNotificationUtils` groups notifications per sender, shows avatars (downloaded on a worker thread), and uses distinct channel IDs for message notifications.
+- Reply actions use `RemoteInput` so users can respond from the shade; messages are re-rendered in the notification after sending.
+- `AppConstants.FCMConstants` centralizes channel IDs, group keys, and summary IDs—update these if you already use conflicting channels in your app.
+
+### 4.6 Convert payloads to CometChat message objects
+
+If you need a `BaseMessage` from a push payload (for deep links or custom UI), parse the `message` JSON and pass it to `CometChatHelper.processMessage` inside `onMessageReceived`:
+
+```kotlin
+override fun onMessageReceived(remoteMessage: RemoteMessage) {
+ val messageJson = remoteMessage.data["message"] ?: return
+ val baseMessage = CometChatHelper.processMessage(JSONObject(messageJson))
+ // Use baseMessage to open the right chat/thread
+}
+```
+
+### 4.7 Customizing the notification body via metadata
+
+To override the push body, include `pushNotification` inside the message `metadata` before sending:
+
+```kotlin
+val receiverId = "TARGET_UID"
+val customData = JSONObject().put("yourKey", "yourValue")
+val meta = JSONObject().put("pushNotification", "Custom notification body")
+
+val customMessage = CustomMessage(
+ receiverId,
+ CometChatConstants.RECEIVER_TYPE_USER,
+ customData
+).apply { metadata = meta }
+
+CometChat.sendCustomMessage(customMessage, object : CallbackListener() {})
+```
+
+## 5. Testing checklist
+
+1. Install the app on a physical device, grant notification and microphone permissions (Android 13+ requires `POST_NOTIFICATIONS`).
+2. Log in and ensure `registerPushToken` succeeds (watch Logcat for the token and success callback).
+3. Send a message push from the CometChat dashboard:
+ - Foreground: grouped local notification shows unless you are in that conversation.
+ - Background/terminated: tapping the FCM notification opens the correct conversation.
+4. Use inline reply from the notification shade; verify the reply is delivered and the notification updates.
+5. Trigger an incoming call push:
+ - Native full-screen call UI shows with caller info.
+ - Accept/Decline actions reach the app; cancel/timeout dismisses the telecom call.
+6. Rotate network conditions or reinstall the app to confirm token re-registration works.
+
+## 6. Troubleshooting
+
+| Symptom | Quick checks |
+| --- | --- |
+| No notifications received | Confirm `google-services.json` location, package name match, notification permission granted, and Push Notifications extension enabled with the correct provider ID. |
+| Token registration fails | Verify `AppConstants.FCMConstants.PROVIDER_ID`, ensure registration runs after login, and check Firebase project uses the same package name. |
+| Notification taps do nothing | Make sure `SplashActivity` consumes `NOTIFICATION_PAYLOAD` extras and that `launchMode` is not preventing the intent from delivering data. |
+| Call UI never shows | Ensure all telecom permissions are declared and granted, `CometChatVoIPConnectionService` is in the manifest, and the device supports `MANAGE_OWN_CALLS`. |
+| Inline reply crashes | Keep the broadcast receiver registered, and avoid proguard stripping classes used by `RemoteInput` or FCM. |
+
+## Additional resources
+
+- [Android push-notification sample app (GitHub)](https://github.com/cometchat/cometchat-uikit-android/tree/v5/sample-app-kotlin%2Bpush-notification)
+- [CometChat Push Notification extension docs](/notifications/push-integration.mdx)
+- [Android ConnectionService reference](/notifications/android-connection-service.mdx)
diff --git a/notifications/flutter-push-notifications-android.mdx b/notifications/flutter-push-notifications-android.mdx
new file mode 100644
index 00000000..94a5346b
--- /dev/null
+++ b/notifications/flutter-push-notifications-android.mdx
@@ -0,0 +1,222 @@
+---
+title: "Android Push Notifications (Flutter UI Kit)"
+description: "End-to-end walkthrough for recreating the CometChat push from the Flutter UI Kit sample on Android."
+---
+
+The Flutter UI Kit push-notification demo already solves FCM permissions, background handlers, full-screen incoming-call UI, and navigation from terminated state. This guide distills that reference implementation so you can bring the exact experience into any Flutter app that uses CometChat UI Kit and Calls UI Kit.
+
+
+ Browse the full push-notification sample (Flutter + native Android glue) to diff or copy files.
+
+
+
+The steps below refer to the folder names inside the sample repo (for example
+lib/notifications,
+android/app/src/main/kotlin/com/cometchat/sampleapp/flutter/android/MainActivity.kt, or
+android/app/src/main/AndroidManifest.xml).
+Copy the same structure into your project and only change identifiers (applicationId/package name, provider IDs) to match your app.
+
+
+## Architecture map
+
+| Sample path | Role inside the app | What to copy/replicate |
+| --- | --- | --- |
+| [`lib/notifications`](https://github.com/cometchat/cometchat-uikit-flutter/tree/v5/sample_app_push_notifications/lib/notifications) | Models, platform services, FCM helpers, CallKit-style handlers | Copy the directory as-is when starting a new app; keep folder names so imports resolve. |
+| [`lib/main.dart`](https://github.com/cometchat/cometchat-uikit-flutter/blob/v5/sample_app_push_notifications/lib/main.dart) | Initializes Firebase + local notifications, caches `NotificationLaunchHandler`, defines the `callMain` entrypoint for lock-screen calls | Reuse the launch sequence so notification taps from a terminated state reach Flutter before `runApp`. |
+| [`lib/dashboard.dart` / `lib/guard_screen.dart`](https://github.com/cometchat/cometchat-uikit-flutter/blob/v5/sample_app_push_notifications/lib/dashboard.dart) | Boots CometChat UI Kit, requests permissions, registers Call/Notification listeners | Mirror the lifecycle hooks to initialize `FirebaseService` only once and capture pending notification taps. |
+| [`lib/notifications/services/android_notification_service/firebase_services.dart`](https://github.com/cometchat/cometchat-uikit-flutter/blob/v5/sample_app_push_notifications/lib/notifications/services/android_notification_service/firebase_services.dart) | FCM init, background handler, token registration via `PNRegistry`, and CallKit event bridge | Keep the background handler at top level and ensure provider IDs are set before registering tokens. |
+| [`android/app/src/main`](https://github.com/cometchat/cometchat-uikit-flutter/tree/v5/sample_app_push_notifications/android/app/src/main) | Manifest permissions, MethodChannel glue in `MainActivity.kt`, lock-screen `CallActivity`, and `CallActionReceiver` for accept/decline intents | Start from the sample files, then update `applicationId`, channel names, and icons to match your app. |
+
+## 1. Prerequisites
+
+- Firebase project with an Android app configured (package name matches your `applicationId`) and Cloud Messaging enabled; `google-services.json` inside `android/app`.
+- CometChat app credentials (App ID, Region, Auth Key) plus Push Notification extension enabled with an **FCM provider** created for Flutter Android.
+- Flutter 3.24+ / Dart 3+, the latest CometChat UI Kit (`cometchat_chat_uikit`) and Calls UI Kit (`cometchat_calls_uikit`) packages.
+- Physical Android device for testing—full-screen call notifications and background delivery are unreliable on emulators.
+
+## 2. Prepare credentials before coding
+
+### 2.1 Firebase Console
+
+1. Register your Android package name (the same as `applicationId` in `android/app/build.gradle`) and download `google-services.json` into `android/app`.
+2. Enable Cloud Messaging and copy the Server key if you want to send test messages manually.
+
+
+
+
+
+### 2.2 CometChat dashboard
+
+1. Turn on the **Push Notifications** extension (V2).
+
+
+
+
+
+2. Create an FCM provider for Flutter Android and copy the generated provider ID.
+
+
+
+
+
+### 2.3 Local configuration file
+
+Update [`lib/app_credentials.dart`](https://github.com/cometchat/cometchat-uikit-flutter/blob/v5/sample_app_push_notifications/lib/app_credentials.dart) so it exposes your credentials and provider IDs:
+
+```dart
+class AppCredentials {
+ static String _appId = "YOUR_APP_ID";
+ static String _authKey = "YOUR_AUTH_KEY";
+ static String _region = "YOUR_REGION";
+ static String _fcmProviderId = "FCM-PROVIDER-ID";
+}
+```
+
+The sample persists these values to `SharedPreferences`; `saveAppSettingsToNative()` passes them to Android so `CallActionReceiver` can reject calls even if Flutter is not running.
+
+## 3. Bring the notification stack into Flutter
+
+### 3.1 Copy [`lib/notifications`](https://github.com/cometchat/cometchat-uikit-flutter/tree/v5/sample_app_push_notifications/lib/notifications)
+
+- Clone or download the sample once.
+- Copy the entire `lib/notifications` directory (models, Android/iOS services, helpers) into your app.
+- Update the import prefixes (for example replace `package:sample_app_push_notifications/...` with your own package name). Keeping the same folder names avoids manual refactors later.
+
+### 3.2 Wire the entry points
+
+**[`lib/main.dart`](https://github.com/cometchat/cometchat-uikit-flutter/blob/v5/sample_app_push_notifications/lib/main.dart)**
+
+- Initialize `SharedPreferencesClass`, `FlutterLocalNotificationsPlugin`, and Firebase before calling `runApp`.
+- Cache `NotificationLaunchHandler.pendingNotificationResponse` when the app is launched from a tapped notification while terminated.
+- Keep the `callMain` entrypoint; `CallActivity` uses it to render the ongoing-call UI over the lock screen.
+
+**[`lib/guard_screen.dart`](https://github.com/cometchat/cometchat-uikit-flutter/blob/v5/sample_app_push_notifications/lib/guard_screen.dart) / [`lib/dashboard.dart`](https://github.com/cometchat/cometchat-uikit-flutter/blob/v5/sample_app_push_notifications/lib/dashboard.dart) (or your first screen after login)**
+
+- Ensure `CometChatUIKit.init()` and `CometChatUIKit.login()` finish before rendering the dashboard.
+- On Android, instantiate `FirebaseService` and call `notificationService.init(context)` once; on iOS, keep `APNSService`.
+- Replay `NotificationLaunchHandler.pendingNotificationResponse` after the widget tree builds so taps from a killed app still navigate to `MessagesScreen`.
+- Forward lifecycle changes to `IncomingCallOverlay` / `BoolSingleton` to hide stale overlays when the app resumes.
+- `VoipNotificationHandler.handleNativeCallIntent(context)` runs after the first frame to act on accept/decline actions that were tapped from the Android notification before Flutter started.
+
+### 3.3 Align dependencies and configuration
+
+Mirror the sample `pubspec.yaml` versions (update as needed when newer releases ship):
+
+```yaml
+dependencies:
+ firebase_core: ^3.9.0
+ firebase_messaging: ^15.1.6
+ flutter_local_notifications: ^18.0.0
+ flutter_callkit_incoming:
+ path: ../sample_app_push_notifications/flutter_callkit_incoming
+ cometchat_chat_uikit: ^5.2.5
+ cometchat_calls_uikit: ^5.0.11
+ permission_handler: ^11.3.1
+ shared_preferences: ^2.2.1
+```
+
+Run `flutter pub get`, then `flutterfire configure` if you still need to generate `firebase_options.dart`.
+
+## 4. Configure the native Android layer
+
+### 4.1 Gradle + Firebase
+
+1. Add `google-services.json` to `android/app`.
+2. Ensure `android/app/build.gradle` applies the plugins used in the sample:
+
+```gradle
+plugins {
+ id "com.android.application"
+ id "com.google.gms.google-services"
+ id "kotlin-android"
+ id "dev.flutter.flutter-gradle-plugin"
+}
+```
+
+Set `applicationId` to your package name and keep `minSdk 24` or higher. `compileSdk 36` / `targetSdk 35` match the sample but can be raised if your project already targets a newer API.
+
+### 4.2 Manifest permissions and components
+
+Use the sample [`AndroidManifest.xml`](https://github.com/cometchat/cometchat-uikit-flutter/blob/v5/sample_app_push_notifications/android/app/src/main/AndroidManifest.xml) as a baseline:
+
+- Permissions for notifications, audio/video, and lock-screen call UI: `POST_NOTIFICATIONS`, `RECORD_AUDIO`, `CAMERA`, `FOREGROUND_SERVICE`, `USE_FULL_SCREEN_INTENT`, `WAKE_LOCK`, `SHOW_WHEN_LOCKED`, `TURN_SCREEN_ON`, and `SYSTEM_ALERT_WINDOW`.
+- `MainActivity` uses `launchMode="singleTask"` with `android:showWhenLocked="true"` / `android:turnScreenOn="true"` so incoming calls can wake the screen.
+- `CallActivity` is a dedicated entrypoint (uses `callMain`) to render the ongoing call over the lock screen and is excluded from recents.
+- `CallActionReceiver` listens to `flutter_callkit_incoming` actions (and mirrored app-specific actions) so Accept/Decline from the native notification reach Flutter.
+- Set `default_notification_icon` meta-data to your icon if you change the launcher asset.
+
+### 4.3 Kotlin bridge for call intents
+
+- [`MainActivity.kt`](https://github.com/cometchat/cometchat-uikit-flutter/blob/v5/sample_app_push_notifications/android/app/src/main/kotlin/com/cometchat/sampleapp/flutter/android/MainActivity.kt) exposes a `MethodChannel("com.cometchat.sampleapp")` that supports:
+ - `get_initial_call_intent` – read and clear any call intent extras so `VoipNotificationHandler.handleNativeCallIntent` in Dart can react after Flutter launches.
+ - `setupLockScreenForCall` / `restoreLockScreenAfterCall` – temporarily bypass and then restore the lock screen when a call is accepted.
+ - `saveAppSettings` – stores your App ID and Region for the broadcast receiver.
+- [`CallActionReceiver.kt`](https://github.com/cometchat/cometchat-uikit-flutter/blob/v5/sample_app_push_notifications/android/app/src/main/kotlin/com/cometchat/sampleapp/flutter/android/CallActionReceiver.kt) wakes the app for Accept/Decline actions. On decline, it can initialize the CometChat SDK headlessly (using the saved App ID/Region) to reject the call as busy even if Flutter is not running.
+- [`CallActivity.kt`](https://github.com/cometchat/cometchat-uikit-flutter/blob/v5/sample_app_push_notifications/android/app/src/main/kotlin/com/cometchat/sampleapp/flutter/android/CallActivity.kt) overrides `getDartEntrypointFunctionName` to `callMain`, letting the ongoing-call UI render in its own activity with lock-screen flags.
+
+If you change the MethodChannel name in Kotlin, update `voipPlatformChannel` inside [`lib/notifications/services/save_settings_to_native.dart`](https://github.com/cometchat/cometchat-uikit-flutter/blob/v5/sample_app_push_notifications/lib/notifications/services/save_settings_to_native.dart) to match.
+
+## 5. Token registration and runtime events
+
+### 5.1 FCM tokens
+
+`FirebaseService.init` requests notification permission, sets the background handler (`firebaseMessagingBackgroundHandler`), and registers tokens:
+
+```dart
+final token = await FirebaseMessaging.instance.getToken();
+if (token != null) {
+ PNRegistry.registerPNService(token, true, false); // platform: FCM_FLUTTER_ANDROID
+}
+FirebaseMessaging.instance.onTokenRefresh.listen(
+ (token) => PNRegistry.registerPNService(token, true, false),
+);
+```
+
+`PNRegistry` pulls the provider ID from `AppCredentials.fcmProviderId`. Call this only after `CometChatUIKit.login` succeeds.
+
+### 5.2 Local notifications and navigation
+
+- `LocalNotificationService.showNotification` renders a high-priority local notification when the incoming CometChat message does not belong to the currently open conversation.
+- `NotificationLaunchHandler.pendingNotificationResponse` caches taps triggered while the app is terminated; `dashboard.dart` replays it after navigation is ready.
+- `LocalNotificationService.handleNotificationTap` fetches the user/group and pushes `MessagesScreen` when a notification is tapped from foreground, background, or terminated states.
+
+### 5.3 Call events (VoIP-like pushes)
+
+- The top-level `firebaseMessagingBackgroundHandler` shows the incoming-call UI by calling `VoipNotificationHandler.displayIncomingCall`, which uses `flutter_callkit_incoming` to render a full-screen notification.
+- `FirebaseService.initializeCallKitListeners` binds `FlutterCallkitIncoming.onEvent` so Accept/Decline/Timeout actions map to `VoipNotificationHandler.acceptVoipCall`, `declineVoipCall`, or `endCall`.
+- `VoipNotificationHandler.handleNativeCallIntent` reads Accept/Decline extras passed from `CallActionReceiver` via the MethodChannel if the user acted before Flutter started.
+- `saveAppSettingsToNative()` runs during `FirebaseService.init` to persist App ID/Region for the native receiver; keep it in place or `CallActionReceiver` cannot initialize CometChat when rejecting a call from the lock screen.
+
+## 6. Testing checklist
+
+1. Run on a physical Android device. Grant notification, microphone, and camera permissions when prompted (Android 13+ requires `POST_NOTIFICATIONS`).
+2. From the CometChat Dashboard, send a standard message notification. Verify:
+ - Foreground: a local notification banner shows (unless you are in that chat).
+ - Background: FCM notification appears; tapping opens the right conversation.
+3. Force-quit the app, send another message push, tap it, and confirm `NotificationLaunchHandler` launches `MessagesScreen`.
+4. Trigger an incoming CometChat call. Ensure:
+ - The full-screen call UI shows caller name/type with Accept/Decline.
+ - Accepting on the lock screen notifies Flutter (`handleNativeCallIntent`), starts the call session, and dismisses the native UI when the call ends.
+ - Declining from the notification triggers `CallActionReceiver` to reject the call server-side.
+5. Rotate through Wi-Fi/cellular and reinstall the app to confirm token registration works after refresh events.
+
+## 7. Troubleshooting tips
+
+| Symptom | Quick checks |
+| --- | --- |
+| No notifications received | Confirm `google-services.json` is in `android/app`, the package name matches Firebase, and notification permission is granted (Android 13+). |
+| Token registration errors | Double-check `AppCredentials.fcmProviderId` and that `PNRegistry.registerPNService` runs after login. |
+| Call actions never reach Flutter | Ensure `CallActionReceiver` is declared in the manifest, MethodChannel names match `voipPlatformChannel`, and `VoipNotificationHandler.handleNativeCallIntent` is called from `dashboard.dart`. |
+| Full-screen call UI not showing | Verify `USE_FULL_SCREEN_INTENT`, `WAKE_LOCK`, and `SHOW_WHEN_LOCKED` permissions plus `android:showWhenLocked="true"` / `android:turnScreenOn="true"` on `MainActivity` and `CallActivity`. |
+| Tapping notification from killed app does nothing | Keep the `NotificationLaunchHandler` logic in `main.dart` and replay it after the navigator key is ready (post-frame callback). |
+
+## Additional resources
+
+- [Flutter push-notification sample app (GitHub)](https://github.com/cometchat/cometchat-uikit-flutter/tree/v5/sample_app_push_notifications)
+- [CometChat Push Notification extension docs](/notifications/push-integration.mdx)
+- [Flutter UI Kit quickstart](https://www.cometchat.com/docs/ui-kit/flutter/getting-started)
+- [Android connection service reference](/notifications/android-connection-service.mdx)
diff --git a/notifications/flutter-push-notifications-ios.mdx b/notifications/flutter-push-notifications-ios.mdx
new file mode 100644
index 00000000..24091373
--- /dev/null
+++ b/notifications/flutter-push-notifications-ios.mdx
@@ -0,0 +1,223 @@
+---
+title: "iOS Push Notifications (Flutter UI Kit)"
+description: "End-to-end walkthrough for recreating the CometChat push + CallKit experience from the Flutter UI Kit sample."
+---
+
+The Flutter UI Kit push-notification demo already solves permission prompts, Firebase/APNs registration, PushKit, and CallKit synchronization. This guide distills that reference implementation so you can bring the exact experience into any Flutter app that uses CometChat UI Kit and Calls UI Kit.
+
+
+ Browse the full push-notification sample (Flutter + native iOS glue) to diff or copy files.
+
+
+
+The steps below refer to the folder names inside the sample repo (for example
+lib/notifications
+or
+ios/Runner/AppDelegate.swift).
+Copy the same structure into your project and only change identifiers (bundle ID, provider IDs, package name) to match your app.
+
+
+## Architecture map
+
+| Sample path | Role inside the app | What to copy/replicate |
+| --- | --- | --- |
+| [`lib/notifications`](https://github.com/cometchat/cometchat-uikit-flutter/tree/v5/sample_app_push_notifications/lib/notifications) | Models, platform services, push registry helpers, MethodChannel bridge handlers | Copy the directory as-is when starting a new app; keep the folder boundaries so imports resolve. |
+| [`lib/main.dart`](https://github.com/cometchat/cometchat-uikit-flutter/blob/v5/sample_app_push_notifications/lib/main.dart) | Initializes Firebase, SharedPreferences, local notifications, and wires `APNSService.setupNativeCallListener` | Reuse the launch sequence so notification taps from a terminated state reach Flutter before `runApp`. |
+| [`lib/dashboard.dart`](https://github.com/cometchat/cometchat-uikit-flutter/blob/v5/sample_app_push_notifications/lib/dashboard.dart) / [`lib/guard_screen.dart`](https://github.com/cometchat/cometchat-uikit-flutter/blob/v5/sample_app_push_notifications/lib/guard_screen.dart) | Boots CometChat UI Kit, requests permissions, registers Call/Notification listeners | Mirror the lifecycle hooks to initialize `APNSService` only once and capture pending notification taps. |
+| [`ios/Runner/AppDelegate.swift`](https://github.com/cometchat/cometchat-uikit-flutter/blob/v5/sample_app_push_notifications/ios/Runner/AppDelegate.swift) | PushKit + CallKit bridge plus MethodChannel glue for VoIP token + call events | Start from the sample file and update the bundle identifiers or localized strings. |
+| [`lib/notifications/services/pn_registry.dart`](https://github.com/cometchat/cometchat-uikit-flutter/blob/v5/sample_app_push_notifications/lib/notifications/services/pn_registry.dart) | Wraps `CometChatNotifications.registerPushToken` for APNs, VoIP, and FCM | Supply your CometChat provider IDs so registration works in every environment. |
+
+## 1. Prerequisites
+
+- Apple Developer account with Push Notifications, Background Modes, and VoIP entitlements for your bundle ID.
+- Firebase project with an iOS app configured (`GoogleService-Info.plist` inside the Runner target) and Cloud Messaging enabled.
+- CometChat app credentials (App ID, Region, Auth Key) plus Push Notification extension enabled with APNs + VoIP providers created.
+- Flutter 3.24+ / Dart 3+, the latest CometChat UI Kit (`cometchat_chat_uikit`) and Calls UI Kit (`cometchat_calls_uikit`) packages.
+- Physical iPhone or iPad for testing—simulators cannot receive VoIP pushes or present CallKit UI.
+
+## 2. Prepare credentials before coding
+
+### 2.1 Apple Developer portal
+
+1. Generate an APNs Auth Key (`.p8`) and note the **Key ID** and **Team ID**.
+2. Enable Push Notifications plus Background Modes → *Remote notifications* and *Voice over IP* on the bundle ID.
+3. Create a VoIP Services certificate/key if you want separate credentials.
+
+### 2.2 Firebase Console
+
+1. Register the same bundle ID and download `GoogleService-Info.plist`.
+2. Enable Cloud Messaging and, if needed, APNs authentication key under *Project Settings → Cloud Messaging*.
+
+### 2.3 CometChat dashboard
+
+1. Turn on the **Push Notifications** extension (V2).
+
+
+
+
+
+2. Create one provider for APNs device pushes and (optionally) another for VoIP pushes.
+
+
+
+
+
+3. Copy the generated provider IDs—they are required inside `CometChatConfig`.
+
+
+
+### 2.4 Local configuration files
+
+Update [`lib/cometchat_config.dart`](https://github.com/cometchat/cometchat-uikit-flutter/blob/v5/sample_app_push_notifications/lib/cometchat_config.dart) (or your own config file) so it exposes:
+
+```dart
+class CometChatConfig {
+ static const appId = "YOUR_APP_ID";
+ static const region = "YOUR_APP_REGION";
+ static const authKey = "YOUR_AUTH_KEY";
+ static const fcmProviderId = "FCM-PROVIDER-ID";
+ static const apnProviderId = "APNS-PROVIDER-ID";
+ static const apnVoipProviderId = "APNS-VOIP-PROVIDER-ID"; // optional but recommended
+}
+```
+
+## 3. Bring the notification stack into Flutter
+
+### 3.1 Copy [`lib/notifications`](https://github.com/cometchat/cometchat-uikit-flutter/tree/v5/sample_app_push_notifications/lib/notifications)
+
+- Clone or download the sample once.
+- Copy the entire [`lib/notifications`](https://github.com/cometchat/cometchat-uikit-flutter/tree/v5/sample_app_push_notifications/lib/notifications) directory (models, Android/iOS services, helpers) into your app.
+- Update the import prefixes (for example replace `package:flutter_application_demo/...` with your own package name). Keeping the same folder names avoids manual refactors later.
+
+### 3.2 Wire the entry points
+
+**[`lib/main.dart`](https://github.com/cometchat/cometchat-uikit-flutter/blob/v5/sample_app_push_notifications/lib/main.dart)**
+
+- Initialize `SharedPreferencesClass`, Firebase, and `FlutterLocalNotificationsPlugin` before calling `runApp`.
+- Store `NotificationLaunchHandler.pendingNotificationResponse` when the app is opened by tapping a notification while terminated.
+- On iOS, call `APNSService.setupNativeCallListener(context)` from `initState` so Flutter reacts when the native CallKit UI changes state.
+
+**[`lib/guard_screen.dart`](https://github.com/cometchat/cometchat-uikit-flutter/blob/v5/sample_app_push_notifications/lib/guard_screen.dart) / [`lib/dashboard.dart`](https://github.com/cometchat/cometchat-uikit-flutter/blob/v5/sample_app_push_notifications/lib/dashboard.dart) (or your first screen after login)**
+
+- Ensure `CometChatUIKit.init()` and `CometChatUIKit.login()` finish before rendering the dashboard.
+- Instantiate `APNSService` (iOS only) and call `apnsService.init(context)` inside `initState`.
+- Register CometChat UI + Calls listeners (`CometChatUIEventListener`, `CometChatCallEventListener`, and `CallListener`) exactly once per session; the sample stores the listener IDs inside `APNSService`.
+- Replay `NotificationLaunchHandler.pendingNotificationResponse` after the widget tree builds so taps from a killed app still navigate to `MessagesScreen`.
+- Forward lifecycle changes to `IncomingCallOverlay` / `BoolSingleton` to hide stale overlays when the app resumes.
+
+### 3.3 Align dependencies and configuration
+
+Mirror the sample `pubspec.yaml` versions (update as needed when newer releases ship):
+
+```yaml
+dependencies:
+ firebase_core: ^3.0.0
+ firebase_messaging: ^15.0.0
+ flutter_apns_x: ^2.1.1
+ flutter_callkit_incoming: ^2.0.3+3
+ flutter_local_notifications: ^16.0.0
+ cometchat_chat_uikit: ^5.0.0
+ cometchat_calls_uikit: ^5.0.0
+ permission_handler: ^11.3.0
+```
+
+Run `flutter pub get`, then `flutterfire configure` if you still need to generate `firebase_options.dart`.
+
+## 4. Configure the native iOS layer
+
+### 4.1 Capabilities and Info.plist
+
+1. Open `ios/Runner.xcworkspace` in Xcode.
+2. Under *Signing & Capabilities*, enable **Push Notifications** and **Background Modes** (Remote notifications + Voice over IP).
+3. Add microphone, camera, Bluetooth, and notification permission strings to `Info.plist`.
+4. Set the development team that has access to the APNs/VoIP keys you generated earlier.
+
+### 4.2 `AppDelegate.swift` bridge
+
+Start from the sample [`ios/Runner/AppDelegate.swift`](https://github.com/cometchat/cometchat-uikit-flutter/blob/v5/sample_app_push_notifications/ios/Runner/AppDelegate.swift) and keep these pieces intact:
+
+- **MethodChannel handshake** – create a channel that both Flutter and Swift know:
+
+```swift
+let appInfoChannel = FlutterMethodChannel(
+ name: "com.flutter_application_demo/ios",
+ binaryMessenger: controller.binaryMessenger
+)
+```
+
+Handle at least `getAppInfo`, `endCall`, `onCallAcceptedFromNative`, and `onCallEndedFromNative`, mirroring the Dart side (`APNSService.setupNativeCallListener`).
+
+- **Firebase + plugin registration** – call `FirebaseApp.configure()` before `GeneratedPluginRegistrant.register(with: self)`.
+- **PushKit** – instantiate `PKPushRegistry`, set `desiredPushTypes = [.voIP]`, and forward the token inside `pushRegistry(_:didUpdate:for:)` via `SwiftFlutterCallkitIncomingPlugin.sharedInstance?.setDevicePushTokenVoIP(tokenHex)`.
+- **CallKit** – configure `CXProviderConfiguration`, keep a `CXCallController`, and implement `provider(_:perform: CXAnswerCallAction)` / `provider(_:perform: CXEndCallAction)` so native actions propagate to Flutter.
+- **Incoming push handler** – inside `pushRegistry(_:didReceiveIncomingPushWith:)`, convert the CometChat payload into `flutter_callkit_incoming.Data`, set `extra` with the raw payload, and call `showCallkitIncoming(..., fromPushKit: true)`.
+- **UUID helper** – reuse `createUUID(sessionid:)` to produce valid `UUID`s from long CometChat session IDs; this lets CallKit correlate calls even if the payload string exceeds 32 characters.
+
+If you change the MethodChannel name in Swift, remember to update `APNSService.platform` in Dart to match.
+
+## 5. Token registration and runtime events
+
+### 5.1 Standard APNs tokens
+
+`APNSService` hooks into `FirebaseMessaging.instance.getAPNSToken()` (and `onTokenRefresh`) before calling:
+
+```dart
+await CometChatPushRegistry.register(
+ token: token,
+ isFcm: false,
+ isVoip: false,
+);
+```
+
+This registers the device token against the APNs provider selected in `CometChatConfig.apnProviderId`.
+
+### 5.2 VoIP tokens
+
+- Capture the PushKit token in `AppDelegate.pushRegistry(_:didUpdate:for:)`.
+- Forward it to Flutter via the MethodChannel or register it directly from Swift by invoking `CometChatPushRegistry` through `SwiftFlutterCallkitIncomingPlugin`.
+- If you keep the Dart implementation, emit a MethodChannel call named `onVoipToken` and handle it in `APNSService` by calling `CometChatPushRegistry.register(token: token, isFcm: false, isVoip: true);`.
+
+### 5.3 Local notifications and navigation
+
+- `APNSService._showNotification` displays a local notification when the incoming CometChat message does not belong to the currently open conversation.
+- `LocalNotificationService.handleNotificationTap` parses the payload, fetches the relevant user/group, and pushes `MessagesScreen`.
+- `NotificationLaunchHandler.pendingNotificationResponse` caches taps triggered while the app is terminated; replay it on the dashboard once the UI is ready.
+
+### 5.4 Call events
+
+- `FlutterCallkitIncoming.onEvent` is already wired inside `APNSService` to accept or end calls initiated by CallKit.
+- When native CallKit UI accepts/ends a call, Swift invokes `onCallAcceptedFromNative` / `onCallEndedFromNative` on the MethodChannel; `APNSService` then calls `FlutterCallkitIncoming.setCallConnected` or `CometChat.endCall()` to keep both stacks synchronized.
+
+## 6. Testing checklist
+
+1. Run the app on a physical device in debug first. Grant notification, microphone, camera, and Bluetooth permissions when prompted.
+2. From the CometChat Dashboard, send a standard message notification. Verify:
+ - Foreground: a local notification banner shows (unless you are in that chat).
+ - Background: APNs notification appears, tapping opens the right conversation.
+3. Force-quit the app, send another message push, tap it, and confirm `NotificationLaunchHandler` launches `MessagesScreen`.
+4. Trigger an incoming CometChat call. Ensure:
+ - CallKit UI shows contact name, call type, and Accept/Decline.
+ - Accepting on the lock screen notifies Flutter (`setupNativeCallListener`), starts the call session, and dismisses the native UI when the call ends.
+5. Decline the call and confirm both CallKit and Flutter clean up (`BoolSingleton` resets, overlays dismissed).
+6. Rotate through Wi-Fi/cellular and reinstall the app to confirm token registration works after refresh events.
+
+## 7. Troubleshooting tips
+
+| Symptom | Quick checks |
+| --- | --- |
+| No VoIP pushes | Entitlements missing? Ensure Push Notifications + Background Modes (VoIP) are enabled and the bundle ID matches the CometChat provider. |
+| CallKit UI never dismisses | Make sure `endCall(callUUID:)` reports to `CXProvider`, runs a `CXEndCallAction`, **and** calls `SwiftFlutterCallkitIncomingPlugin.sharedInstance?.endCall`. |
+| Flutter never receives native call events | Confirm the MethodChannel names match between Swift and Dart, and `APNSService.setupNativeCallListener` runs inside `initState`. |
+| Token registration errors | Double-check `CometChatConfig` provider IDs, and verify you call `registerPushToken` after `CometChatUIKit.login` succeeds. |
+| Notification taps ignored | Ensure you replay `NotificationLaunchHandler.pendingNotificationResponse` **after** the navigator key is ready (typically `WidgetsBinding.instance.addPostFrameCallback`). |
+
+## Additional resources
+
+- [Flutter push-notification sample app (GitHub)](https://github.com/cometchat/cometchat-uikit-flutter/tree/v5/sample_app_push_notifications)
+- [CometChat Push Notification extension docs](/notifications/push-integration.mdx)
+- [Flutter UI Kit quickstart](https://www.cometchat.com/docs/ui-kit/flutter/getting-started)
+- [APNs configuration reference](/notifications/ios-apns-push-notifications.mdx)
diff --git a/notifications/ios-apns-push-notifications-updated.mdx b/notifications/ios-apns-push-notifications-updated.mdx
new file mode 100644
index 00000000..a23cfd0f
--- /dev/null
+++ b/notifications/ios-apns-push-notifications-updated.mdx
@@ -0,0 +1,136 @@
+---
+title: "iOS APNs Push Notifications (UI Kit)"
+description: "Implement APNs + PushKit + CallKit exactly like the UIKit iOS push sample so messages and calls work from foreground to terminated states."
+---
+
+The UIKit iOS push sample handles APNs device pushes, PushKit VoIP pushes, CallKit UI, and message deep links. Follow these steps to mirror that setup in your own app.
+
+
+ Browse the iOS push sample (UIKit + Calls + APNs/PushKit/CallKit glue).
+
+
+
+Paths below refer to the sample repo (for example `examples/push-notification-app/AppDelegate.swift`, `PushNotificationManager.swift`, and any CallKit/PushKit helpers). Copy the same structure into your project and only change identifiers (bundle ID, Team ID, provider IDs).
+
+
+## Architecture map
+
+| Sample path | Role | What to copy/replicate |
+| --- | --- | --- |
+| `AppDelegate.swift` (in `SampleAppPushNotificationAPNs/Push Notification + VoIP`) | Initializes CometChat, registers for APNs, sets `UNUserNotificationCenterDelegate`, hands off PushKit events to CallKit | Keep the init + delegate wiring; update bundle identifiers and capability flags. |
+| `PushNotificationManager.swift` (or equivalent) | Requests notification permission, stores device/voip tokens, registers them with CometChat Push Notifications | Reuse token handling and registration calls; swap in your provider IDs. |
+| CallKit helpers (`CallKitManager.swift`, `VoipHandler.swift`) | Presents native incoming-call UI and routes Accept/Decline to CometChat | Copy configuration (ringtone, icon, video flag) and make sure capabilities are enabled. |
+| Optional Notification Service extension | Rich notification tweaks / logging | Include if you need mutable-content processing; otherwise skip. |
+
+## 1. Prerequisites
+
+- Apple Developer account with Push Notifications + Background Modes (Remote notifications, Voice over IP) and CallKit entitlements on your bundle ID.
+- CometChat app credentials (App ID, Region, Auth Key) and the **Push Notifications** extension enabled with APNs providers created:
+ - APNs Device provider ID for standard alerts.
+ - APNs VoIP provider ID for call-style pushes (recommended for CallKit).
+- Physical iPhone/iPad for testing (PushKit + CallKit do not work on simulators).
+
+### Dashboard settings (Push Notifications extension)
+
+- Set **Extension version** to `V2` (or `V1 & V2` during migration).
+- Select **Platforms**: enable iOS.
+- Upload your APNs auth key/cert for the APNs provider(s) and toggle Production when shipping.
+- Use **Payload trimming** if you risk exceeding ~4 KB (strip metadata or trim text).
+- Toggle **Notification triggers** (messages, calls, groups) to match your app.
+
+## 2. Apple setup
+
+1. Generate an APNs Auth Key (`.p8`) and note **Key ID** and **Team ID** (or use a cert if required).
+2. Enable Push Notifications, Background Modes → *Remote notifications* + *Voice over IP* on the bundle ID.
+3. Add CallKit usage descriptions to `Info.plist` (microphone/camera).
+
+## 3. Wire APNs + PushKit tokens
+
+Use `CometChatNotifications.registerPushToken` to register both tokens after login:
+
+```swift
+// APNs device token (alerts)
+CometChatNotifications.registerPushToken(
+ token: apnsDeviceToken,
+ platform: .apns, // use the APNs device platform enum
+ providerId: ""
+) { _ in
+ print("APNs device token registered")
+} onError: { error in
+ print("APNs register error: \(error?.errorDescription ?? "")")
+}
+
+// PushKit VoIP token (CallKit)
+CometChatNotifications.registerPushToken(
+ token: voipToken,
+ platform: .apnsVoip, // use the APNs VoIP platform enum
+ providerId: ""
+) { _ in
+ print("VoIP token registered")
+} onError: { error in
+ print("VoIP register error: \(error?.errorDescription ?? "")")
+}
+```
+
+- Request alert/badge/sound permission via `UNUserNotificationCenter`.
+- Register for remote notifications (`UIApplication.shared.registerForRemoteNotifications()`).
+- Set `UNUserNotificationCenter.current().delegate = self` to receive foreground taps.
+- PushKit: create a `PKPushRegistry`, set `desiredPushTypes = [.voIP]`, and implement `pushRegistry(_:didUpdate:for:)` to grab the VoIP token.
+
+## 4. Handling incoming pushes
+
+### Message pushes
+
+- Implement `userNotificationCenter(_:willPresent:withCompletionHandler:)` to decide banner/alert options while foregrounded.
+- Use `CometChatHelper.processMessage` (or `CometChat.processMessage`) on the `message` payload to convert into `TextMessage`/`MediaMessage`/`CustomMessage`/`Call` objects for navigation or UI updates.
+- In `didReceive response`, route to the right chat (fetch user/group if needed) before pushing your message screen.
+
+### Call pushes (VoIP)
+
+- In `pushRegistry(_:didReceiveIncomingPushWith:)`, parse the payload, convert to `Call`, and report to CallKit via `CXProvider.reportNewIncomingCall`.
+- Track the session ID and call type to end/dismiss on `cancelled/unanswered/rejected` call actions.
+- On Accept, call `CometChat.acceptCall(sessionID:)` then launch your call UI; on Decline/Busy, call `CometChat.rejectCall(sessionID:status:)` and end the CallKit call.
+
+## 5. Customizing the notification body
+
+To override the APNs body for a message, set `metadata["pushNotification"]` before sending:
+
+```swift
+var metadata = ["pushNotification": "Custom body"]
+let custom = CustomMessage(receiverUid: "TARGET_UID",
+ receiverType: .user,
+ customType: "your_type",
+ customData: ["key": "value"])
+custom.metadata = metadata
+CometChat.sendCustomMessage(message: custom) { _ in } onError: { _ in }
+```
+
+## 6. Testing checklist
+
+1. Install on a device; grant notification permission. Verify APNs device token logs.
+2. Log in, then confirm both device + VoIP tokens are registered with CometChat (success callbacks).
+3. Send a chat push from the CometChat Dashboard:
+ - Foreground: ensure `willPresent` shows your chosen presentation.
+ - Background/terminated: tapping opens the correct conversation.
+4. Trigger an incoming call; CallKit UI should show caller info. Accept should join the call; Decline should reject via CometChat and end CallKit.
+5. Rotate tokens (reinstall or toggle VoIP) to ensure re-registration works.
+
+## 7. Troubleshooting
+
+| Symptom | Quick checks |
+| --- | --- |
+| No pushes | Confirm entitlements, APNs provider creds, bundle ID matches dashboard, and permission is granted. |
+| Token registration fails | Make sure registration runs **after login** and provider IDs are correct for device vs VoIP. |
+| Taps do nothing | Verify notification center delegate, routing logic, and that the scene/navigation controller is ready before pushing. |
+| Call UI missing | Ensure PushKit delegate fires, CallKit capabilities enabled, and VoIP provider ID is set. |
+| Audio errors | Configure `AVAudioSession` for playAndRecord when reporting/accepting calls. |
+
+## Additional resources
+
+- [iOS push sample (GitHub)](https://github.com/cometchat/cometchat-uikit-ios/tree/v5/SampleAppPushNotificationAPNs/Push%20Notification%20%2B%20VoIP)
+- [CometChat Push Notification extension docs](/notifications/push-integration.mdx)
+- [Flutter iOS push guide](/notifications/flutter-push-notifications-ios.mdx)
diff --git a/notifications/ios-fcm-push-notifications-updated.mdx b/notifications/ios-fcm-push-notifications-updated.mdx
new file mode 100644
index 00000000..5e4389c7
--- /dev/null
+++ b/notifications/ios-fcm-push-notifications-updated.mdx
@@ -0,0 +1,127 @@
+---
+title: "iOS FCM Push Notifications (UI Kit)"
+description: "Use Firebase Cloud Messaging with CometChat UI Kit on iOS, while keeping APNs/CallKit behavior from the push sample."
+---
+
+The UIKit iOS push sample shows how to layer FCM on top of APNs so messages and calls arrive in foreground, background, and terminated states. Follow these steps to replicate it.
+
+
+ Browse the iOS push sample (UIKit + Calls + FCM/APNs/PushKit).
+
+
+
+Paths below refer to the sample repo (for example `examples/push-notification-app/AppDelegate.swift` and helper files that manage Firebase Messaging, APNs tokens, and CallKit). Copy the flow, then swap bundle ID, Team ID, and provider IDs.
+
+
+## Architecture map
+
+| Sample path | Role | What to copy/replicate |
+| --- | --- | --- |
+| `AppDelegate.swift` | Initializes CometChat, configures Firebase, sets `UNUserNotificationCenterDelegate`, registers for remote notifications | Mirror init + delegate wiring; ensure `Messaging.messaging().delegate` is assigned. |
+| Firebase/FCM helper (token manager) | Requests notification permission, obtains FCM token, registers it with CometChat Push Notifications | Reuse token handling and registration calls; update provider ID. |
+| PushKit/CallKit helpers | Presents native incoming-call UI from VoIP pushes (recommended even when using FCM for messages) | Keep VoIP registration + CallKit accept/decline wiring. |
+
+## 1. Prerequisites
+
+- Firebase project with an iOS app added; `GoogleService-Info.plist` in your Xcode target; APNs key uploaded under *Project Settings → Cloud Messaging*.
+- Apple Developer entitlements: Push Notifications, Background Modes (Remote notifications, VoIP), CallKit usage descriptions.
+- CometChat app credentials and Push Notifications extension enabled with:
+ - **FCM iOS provider ID** for data pushes.
+ - Optional **APNs device** and **APNs VoIP** provider IDs if you want direct APNs/PushKit delivery (recommended for call reliability).
+- Physical iPhone/iPad for testing; FCM + VoIP pushes are unreliable on simulators.
+
+### Dashboard settings (Push Notifications extension)
+
+- Set **Extension version** to `V2` (or `V1 & V2` during migration).
+- Select **Platforms**: enable iOS.
+- Enter your FCM iOS provider ID; add APNs providers if you plan to register those tokens too.
+- Use **Payload trimming** if payloads risk exceeding ~4 KB; toggle **Notification triggers** as needed.
+
+## 2. Firebase + iOS configuration
+
+1. Add `GoogleService-Info.plist` to the app target.
+2. In *Project Settings → Cloud Messaging*, upload your APNs auth key/cert so FCM can deliver via APNs.
+3. In `AppDelegate`, call `FirebaseApp.configure()` and set `Messaging.messaging().delegate = self`.
+4. Request notification permission via `UNUserNotificationCenter`, set its delegate, and call `UIApplication.shared.registerForRemoteNotifications()`.
+
+## 3. Register the FCM token with CometChat
+
+After the user logs in, register the FCM token with CometChat Push Notifications:
+
+```swift
+Messaging.messaging().token { token, error in
+ guard let token = token else { return }
+ CometChatNotifications.registerPushToken(
+ token: token,
+ platform: .fcmIos, // use the FCM iOS platform enum
+ providerId: ""
+ ) { _ in
+ print("FCM token registered")
+ } onError: { error in
+ print("FCM register error: \(error?.errorDescription ?? "")")
+ }
+}
+
+// Handle token rotation
+func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String?) {
+ guard let token = fcmToken else { return }
+ // Re-register with CometChat here
+}
+```
+
+- Keep APNs device/VoIP registration (via `didRegisterForRemoteNotificationsWithDeviceToken` and PushKit) if you also use APNs providers for calls.
+
+## 4. Handling incoming pushes
+
+### Message pushes (FCM)
+
+- Foreground: handle in `userNotificationCenter(_:willPresent:)` and decide banner/alert options.
+- Background/terminated: taps arrive in `userNotificationCenter(_:didReceive:...)`; parse `userInfo` and navigate to the correct chat. If you include the `message` JSON, convert it with `CometChatHelper.processMessage`.
+- For richer UI, you can add a Notification Service extension; otherwise, FCM→APNs payload will show default alert/sound.
+
+### Call pushes (recommended: PushKit)
+
+- Use PushKit (`PKPushRegistry`) to register a VoIP token and register it with CometChat using the APNs VoIP provider. This enables reliable CallKit UI even when the app is killed.
+- In `pushRegistry(_:didReceiveIncomingPushWith:)`, convert payloads to `Call` objects and report them to CallKit (`CXProvider.reportNewIncomingCall`). Accept/Decline through CometChat `acceptCall` / `rejectCall`.
+
+## 5. Customizing the notification body
+
+Set `metadata["pushNotification"]` before sending to override the body:
+
+```swift
+var metadata = ["pushNotification": "Custom notification body"]
+let custom = CustomMessage(receiverUid: "TARGET_UID",
+ receiverType: .user,
+ customType: "your_type",
+ customData: ["key": "value"])
+custom.metadata = metadata
+CometChat.sendCustomMessage(message: custom) { _ in } onError: { _ in }
+```
+
+## 6. Testing checklist
+
+1. Verify `FirebaseApp.configure()` runs and FCM token logs after login; ensure registration succeeds with CometChat.
+2. Send a dashboard message push:
+ - Foreground: confirm `willPresent` behavior.
+ - Background/terminated: tap opens the correct chat.
+3. Rotate the FCM token (`didReceiveRegistrationToken`) and confirm re-registration works.
+4. If using VoIP: confirm PushKit token registration and that CallKit UI appears for call pushes; Accept/Decline should control the CometChat call.
+
+## 7. Troubleshooting
+
+| Symptom | Quick checks |
+| --- | --- |
+| No FCM pushes | Confirm `GoogleService-Info.plist` placement, APNs key uploaded to Firebase, bundle ID matches, permission granted. |
+| Token registration fails | Ensure it runs after login, provider ID matches the FCM iOS provider, and `Messaging.messaging().delegate` is set. |
+| Taps ignored | Verify `UNUserNotificationCenterDelegate` methods run and navigation is ready before routing. |
+| Call UI missing | Add PushKit + CallKit setup and register a VoIP token with an APNs VoIP provider. |
+
+## Additional resources
+
+- [iOS push sample (GitHub)](https://github.com/cometchat/cometchat-uikit-ios/tree/v5/SampleAppPushNotificationAPNs/Push%20Notification%20%2B%20VoIP)
+- [CometChat Push Notification extension docs](/notifications/push-integration.mdx)
+- [Flutter iOS push guide](/notifications/flutter-push-notifications-ios.mdx)
diff --git a/notifications/react-native-push-notifications-updated.mdx b/notifications/react-native-push-notifications-updated.mdx
new file mode 100644
index 00000000..df944052
--- /dev/null
+++ b/notifications/react-native-push-notifications-updated.mdx
@@ -0,0 +1,185 @@
+---
+title: "React Native Push Notifications"
+description: "Bring the SampleAppWithPushNotifications experience—FCM/APNs, inline replies, and call-style VoIP alerts—into any React Native project using CometChat UI Kit."
+---
+
+The React Native push-notification sample already wires FCM (Android), APNs (iOS), VoIP push + CallKeep, Notifee-powered message banners, and deep links into conversations. Follow this guide to mirror that setup in your own app.
+
+
+ Browse the full React Native push sample (UI Kit + Calls + VoIP).
+
+
+
+Paths below refer to the sample repo (for example
+App.tsx,
+index.js, or
+src/utils).
+Copy the same structure into your project and only change identifiers (bundle ID, package name, provider IDs, app credentials).
+
+
+## Architecture map
+
+| Sample path | Role | What to copy/replicate |
+| --- | --- | --- |
+| [`App.tsx`](https://github.com/cometchat/cometchat-uikit-react-native/blob/v5/examples/SampleAppWithPushNotifications/App.tsx) | Initializes CometChat UI Kit, requests permissions, registers tokens, handles foreground FCM, and navigates on notification taps | Mirror the effects for FCM/APNs/VoIP token handling and Notifee foreground events. |
+| [`index.js`](https://github.com/cometchat/cometchat-uikit-react-native/blob/v5/examples/SampleAppWithPushNotifications/index.js) | Background handlers: FCM `setBackgroundMessageHandler`, Notifee `onBackgroundEvent`, and VoIP call actions | Keep the same handlers so taps from killed/background states navigate correctly and call pushes render native UI. |
+| [`src/utils/PushNotification.tsx`](https://github.com/cometchat/cometchat-uikit-react-native/blob/v5/examples/SampleAppWithPushNotifications/src/utils/PushNotification.tsx) | Thin wrapper around `CometChatNotifications.registerPushToken` / `unregisterPushToken` for FCM + APNs/VoIP | Reuse for token registration; update provider IDs. |
+| [`src/utils/helper.ts`](https://github.com/cometchat/cometchat-uikit-react-native/blob/v5/examples/SampleAppWithPushNotifications/src/utils/helper.ts) | FCM token retrieval, local notifications via Notifee, iOS initial/tap handling, deep links into chats | Copy the helper and keep the navigation logic for conversation routing. |
+| [`src/utils/VoipNotificationHandler.ts`](https://github.com/cometchat/cometchat-uikit-react-native/blob/v5/examples/SampleAppWithPushNotifications/src/utils/VoipNotificationHandler.ts) | RNCallKeep + Notifee bridge for incoming call UI (Android/iOS) and call actions | Use as-is; ensure Android phone account permissions/capabilities and iOS CallKit permissions are configured. |
+| [`src/utils/AppConstants.tsx`](https://github.com/cometchat/cometchat-uikit-react-native/blob/v5/examples/SampleAppWithPushNotifications/src/utils/AppConstants.tsx) | Stores App ID/Region/Auth Key and `fcmProviderId` / `apnProviderId` | Fill with your credentials and provider IDs from the dashboard. |
+| [`ios/SampleAppWithPushNotifications/AppDelegate.swift`](https://github.com/cometchat/cometchat-uikit-react-native/blob/v5/examples/SampleAppWithPushNotifications/ios/SampleAppWithPushNotifications/AppDelegate.swift) | Native glue for iOS: Firebase/UNUserNotificationCenter delegates, PushKit VoIP token, CallKeep incoming calls | Copy the delegates and PushKit setup so FCM/APNs/VoIP events reach JS and CallKeep renders incoming calls. |
+
+## 1. Prerequisites
+
+- CometChat app credentials (App ID, Region, Auth Key) and Push Notifications extension enabled with **FCM provider (React Native)** and **APNs provider** created; copy both provider IDs.
+- Firebase project with Android app configured (`google-services.json` in `android/app`) and FCM enabled.
+- Apple push setup: APNs certificate/keys configured in CometChat, iOS project with Push Notifications + Background Modes (Remote notifications, VoIP) + CallKit permissions.
+- React Native 0.81+, Node 18+, physical devices for reliable push/call testing.
+- Native deps from the sample: `@react-native-firebase/messaging`, `@react-native-firebase/app`, `@notifee/react-native`, `@react-native-community/push-notification-ios`, `react-native-voip-push-notification`, `react-native-callkeep`, and CometChat UI Kit + Calls SDK.
+
+### Push Notification extension settings (dashboard)
+
+- Set **Extension version** to `V2` (or `V1 & V2` while migrating).
+- Select **Platforms**: enable React Native Android + iOS (and others you use).
+- Use **Payload trimming** if you risk exceeding ~4 KB (strip metadata or trim text).
+- Toggle **Notification triggers** (messages, calls, groups) to match your app.
+
+## 2. Project setup (sample parity)
+
+### 2.1 Credentials
+
+- Update `src/utils/AppConstants.tsx` with `appId`, `authKey`, `region`, `fcmProviderId`, and `apnProviderId`.
+- Keep `app.json` name consistent with your bundle ID / applicationId.
+
+### 2.2 Gradle + Firebase (Android)
+
+1. Place `google-services.json` in `android/app`.
+2. Apply `com.google.gms.google-services` in `android/app/build.gradle` (the sample already does).
+3. Ensure `minSdk`/`targetSdk` match your project (sample uses RN 0.81 defaults).
+4. Grant notification + call permissions in the manifest (POST_NOTIFICATIONS, RECORD_AUDIO, CAMERA, READ_PHONE_STATE, FOREGROUND_SERVICE, ANSWER_PHONE_CALLS, USE_FULL_SCREEN_INTENT, WAKE_LOCK, VIBRATE).
+
+### 2.3 iOS capabilities
+
+1. Enable Push Notifications + Background Modes (Remote notifications, VoIP).
+2. Add CallKit usage descriptions to `Info.plist` (microphone/camera) and configure `react-native-callkeep` per sample `ios/` folder.
+3. Add your APNs auth key/cert in the CometChat dashboard provider.
+
+### 2.4 Dependencies snapshot (from sample)
+
+```json
+{
+ "@cometchat/chat-uikit-react-native": "5.2.6",
+ "@cometchat/chat-sdk-react-native": "4.0.18",
+ "@cometchat/calls-sdk-react-native": "4.4.0",
+ "@react-native-firebase/app": "23.4.0",
+ "@react-native-firebase/messaging": "23.4.0",
+ "@notifee/react-native": "9.1.8",
+ "@react-native-community/push-notification-ios": "1.11.0",
+ "react-native-voip-push-notification": "3.3.3",
+ "react-native-callkeep": "github:cometchat/react-native-callkeep"
+}
+```
+
+Match these or newer compatible versions in your app.
+
+## 3. Wire up push tokens
+
+### 3.1 Register tokens with CometChat
+
+[`registerPushToken`](https://github.com/cometchat/cometchat-uikit-react-native/blob/v5/examples/SampleAppWithPushNotifications/src/utils/PushNotification.tsx) maps platform + provider ID to `CometChatNotifications.registerPushToken`:
+
+```ts
+// FCM: isFcm=true, isVoip=false
+await registerPushToken(token, true, false);
+// APNs device: isFcm=false, isVoip=false
+await registerPushToken(deviceToken, false, false);
+// APNs VoIP: isFcm=false, isVoip=true
+await registerPushToken(voipToken, false, true);
+```
+
+### 3.2 Android (FCM)
+
+- `getAndRegisterFCMToken` (helper.ts) runs after login and registers the token; `messaging().onTokenRefresh` re-registers on rotation.
+- Foreground messages: `messaging().onMessage` in `App.tsx` shows a Notifee notification via `displayLocalNotification` unless that chat is open.
+- Background/terminated: `messaging().setBackgroundMessageHandler` in `index.js` shows Notifee notifications for chats or triggers VoIP call UI when `data.type === 'call'`.
+
+### 3.3 iOS (APNs + VoIP)
+
+- `PushNotificationIOS.requestPermissions` requests alert/badge/sound.
+- APNs device token: `PushNotificationIOS` `'register'` event calls `handleIosApnsToken` to register with CometChat.
+- VoIP token: `react-native-voip-push-notification` `'register'` event calls `handleIosVoipToken`; `VoipPushNotification.registerVoipToken()` is triggered after APNs registration.
+- Taps + initial opens: `checkInitialNotificationIOS` and `onRemoteNotificationIOS` fetch the user/group and navigate to `Messages` with parent threads when present.
+- **AppDelegate.swift changes** (native iOS):
+ - Add `UNUserNotificationCenterDelegate` to forward APNs callbacks to `RNCPushNotificationIOS`.
+ - Register PushKit (`PKPushRegistry` with `.voIP`) and forward VoIP tokens to `RNVoipPushNotificationManager.didUpdate`.
+ - In `pushRegistry(_:didReceiveIncomingPushWith:)`, map `callAction` values to `RNCallKeep.reportNewIncomingCall` / `endCall` so VoIP pushes show native CallKit UI when the app is backgrounded/killed.
+ - Keep `RNVoipPushNotificationManager.voipRegistration()` in `didFinishLaunching` and set `UNUserNotificationCenter.current().delegate = self`.
+
+### 3.4 Logout / cleanup
+
+Call `CometChat.logout()` and `unregisterPushToken()` when signing out; delete FCM token if you want to force a fresh registration on next login.
+
+## 4. Message notifications
+
+- Notifee foreground notifications (`displayLocalNotification`) skip the current open chat and include avatars, BigText, and conversation metadata for navigation.
+- Notifee background presses are handled in `index.js` and `App.tsx` (foreground) to navigate via `navigateToConversation`.
+- iOS notifications deliver `data.message` and `data.parentId`; helpers fetch the user/group before navigation.
+- To turn a push payload back into a CometChat object for custom UI, use:
+
+```ts
+const baseMessage = CometChat.CometChatHelper.processMessage(
+ JSON.parse(remoteMessage.data.message),
+);
+```
+
+## 5. Call notifications (VoIP-like)
+
+- FCM `data.type === "call"` is handled in `index.js` background handler: call actions (`initiated`, `cancelled`, `rejected`, `busy`, `ended`, `unanswered`, `ongoing`) drive `VoipNotificationHandler`.
+- `VoipNotificationHandler` uses CallKeep to show native incoming call UI and manage telecom permissions; `PendingCallManager` resumes accepted calls if the app was cold-started.
+- Android foreground calls still arrive via FCM; ensure phone account permissions are granted or CallKeep cannot render the incoming screen.
+
+## 6. Customizing the push body
+
+Set `metadata.pushNotification` before sending to override the body:
+
+```ts
+const metadata = { pushNotification: 'Custom notification body' };
+const message = new CometChat.CustomMessage(
+ receiverId,
+ CometChat.RECEIVER_TYPE.USER,
+ 'your_type',
+ { yourKey: 'value' },
+);
+message.setMetadata(metadata);
+CometChat.sendCustomMessage(message);
+```
+
+## 7. Testing checklist
+
+1. Android: install on device, grant POST_NOTIFICATIONS; log in and verify FCM token registration success.
+2. Send a chat push from CometChat Dashboard:
+ - Foreground: Notifee banner shows unless that chat is open.
+ - Background/terminated: tap opens the correct conversation; Notifee background handler runs.
+3. iOS: verify APNs device token + VoIP token register; tap push from killed app opens the right chat; remote notifications finish handler is called.
+4. Trigger incoming call push: native CallKeep UI should show caller info; Accept/Decline routes to the app and clears CallKeep state on cancel/end.
+5. Rotate tokens (reinstall or revoke) and confirm `onTokenRefresh` re-registers.
+
+## 8. Troubleshooting
+
+| Symptom | Quick checks |
+| --- | --- |
+| No pushes | Confirm `google-services.json` location, package/bundle IDs match Firebase/Apple, Push extension enabled with correct provider IDs, permissions granted. |
+| Token registration fails | Ensure registration runs **after login**, provider IDs are set, and `registerDeviceForRemoteMessages()` is called (Android). |
+| Notification taps do nothing | Keep Notifee foreground/background handlers and `checkInitialNotificationIOS`; ensure navigation ref is ready before routing. |
+| Call UI not showing | Verify CallKeep setup, telecom permissions (Android) or CallKit entitlement (iOS), and that `VoipNotificationHandler.initialize()` runs post-login. |
+| Inline reply needed | Extend Notifee action buttons; CometChat expects you to send the message manually after reading `remoteMessage.data`. |
+
+## Additional resources
+
+- [React Native push-notification sample (GitHub)](https://github.com/cometchat/cometchat-uikit-react-native/tree/v5/examples/SampleAppWithPushNotifications)
+- [CometChat Push Notification extension docs](/notifications/push-integration.mdx)
+- [Flutter push-notification guides](/notifications/flutter-push-notifications-android.mdx), [iOS](/notifications/flutter-push-notifications-ios.mdx)