@cometchat/skills 4.1.0 → 4.2.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.
Files changed (257) hide show
  1. package/bin/install.js +298 -41
  2. package/package.json +1 -1
  3. package/skills/cometchat/SKILL.md +146 -27
  4. package/skills/cometchat-a11y/SKILL.md +476 -0
  5. package/skills/cometchat-android-v5/SKILL.md +1 -1
  6. package/skills/cometchat-android-v5-calls/SKILL.md +413 -0
  7. package/skills/cometchat-android-v5-calls/references/README.md +53 -0
  8. package/skills/cometchat-android-v5-calls/references/add-calls-to-existing-chat.md +195 -0
  9. package/skills/cometchat-android-v5-calls/references/audio-controls.md +91 -0
  10. package/skills/cometchat-android-v5-calls/references/background-handling.md +168 -0
  11. package/skills/cometchat-android-v5-calls/references/call-layouts.md +123 -0
  12. package/skills/cometchat-android-v5-calls/references/call-logs.md +113 -0
  13. package/skills/cometchat-android-v5-calls/references/call-session.md +274 -0
  14. package/skills/cometchat-android-v5-calls/references/custom-ui.md +150 -0
  15. package/skills/cometchat-android-v5-calls/references/event-listeners.md +123 -0
  16. package/skills/cometchat-android-v5-calls/references/group-calls.md +205 -0
  17. package/skills/cometchat-android-v5-calls/references/idle-timeout.md +111 -0
  18. package/skills/cometchat-android-v5-calls/references/in-call-chat.md +134 -0
  19. package/skills/cometchat-android-v5-calls/references/join-session.md +120 -0
  20. package/skills/cometchat-android-v5-calls/references/migration-v4-to-v5.md +206 -0
  21. package/skills/cometchat-android-v5-calls/references/participant-management.md +110 -0
  22. package/skills/cometchat-android-v5-calls/references/picture-in-picture.md +106 -0
  23. package/skills/cometchat-android-v5-calls/references/raise-hand.md +242 -0
  24. package/skills/cometchat-android-v5-calls/references/recording.md +101 -0
  25. package/skills/cometchat-android-v5-calls/references/ringing-integration.md +152 -0
  26. package/skills/cometchat-android-v5-calls/references/screen-sharing.md +82 -0
  27. package/skills/cometchat-android-v5-calls/references/server-fcm-voip.md +215 -0
  28. package/skills/cometchat-android-v5-calls/references/session-settings.md +121 -0
  29. package/skills/cometchat-android-v5-calls/references/setup.md +137 -0
  30. package/skills/cometchat-android-v5-calls/references/share-invite.md +151 -0
  31. package/skills/cometchat-android-v5-calls/references/video-controls.md +87 -0
  32. package/skills/cometchat-android-v5-calls/references/voip-calling.md +526 -0
  33. package/skills/cometchat-android-v5-components/SKILL.md +1 -1
  34. package/skills/cometchat-android-v5-core/SKILL.md +1 -1
  35. package/skills/cometchat-android-v5-customization/SKILL.md +1 -1
  36. package/skills/cometchat-android-v5-extensions/SKILL.md +1 -1
  37. package/skills/cometchat-android-v5-features/SKILL.md +1 -1
  38. package/skills/cometchat-android-v5-placement/SKILL.md +1 -1
  39. package/skills/cometchat-android-v5-production/SKILL.md +1 -1
  40. package/skills/cometchat-android-v5-push/SKILL.md +1 -1
  41. package/skills/cometchat-android-v5-testing/SKILL.md +1 -1
  42. package/skills/cometchat-android-v5-theming/SKILL.md +1 -1
  43. package/skills/cometchat-android-v5-troubleshooting/SKILL.md +1 -1
  44. package/skills/cometchat-android-v6/SKILL.md +1 -1
  45. package/skills/cometchat-android-v6-builder-settings/SKILL.md +1 -1
  46. package/skills/cometchat-android-v6-calls/SKILL.md +375 -0
  47. package/skills/cometchat-android-v6-calls/references/add-calls-to-existing-chat.md +97 -0
  48. package/skills/cometchat-android-v6-calls/references/call-layouts.md +91 -0
  49. package/skills/cometchat-android-v6-calls/references/call-session.md +163 -0
  50. package/skills/cometchat-android-v6-calls/references/device-management.md +171 -0
  51. package/skills/cometchat-android-v6-calls/references/group-calls.md +191 -0
  52. package/skills/cometchat-android-v6-calls/references/idle-timeout.md +107 -0
  53. package/skills/cometchat-android-v6-calls/references/in-call-chat.md +136 -0
  54. package/skills/cometchat-android-v6-calls/references/raise-hand.md +186 -0
  55. package/skills/cometchat-android-v6-calls/references/ringing-integration.md +176 -0
  56. package/skills/cometchat-android-v6-calls/references/server-fcm-voip.md +127 -0
  57. package/skills/cometchat-android-v6-calls/references/share-invite.md +105 -0
  58. package/skills/cometchat-android-v6-compose-components/SKILL.md +2 -2
  59. package/skills/cometchat-android-v6-compose-customization/SKILL.md +1 -1
  60. package/skills/cometchat-android-v6-compose-placement/SKILL.md +1 -1
  61. package/skills/cometchat-android-v6-compose-theming/SKILL.md +1 -1
  62. package/skills/cometchat-android-v6-core/SKILL.md +1 -1
  63. package/skills/cometchat-android-v6-events/SKILL.md +1 -1
  64. package/skills/cometchat-android-v6-extensions/SKILL.md +1 -1
  65. package/skills/cometchat-android-v6-features/SKILL.md +1 -1
  66. package/skills/cometchat-android-v6-kotlin-components/SKILL.md +1 -1
  67. package/skills/cometchat-android-v6-kotlin-customization/SKILL.md +1 -1
  68. package/skills/cometchat-android-v6-kotlin-placement/SKILL.md +1 -1
  69. package/skills/cometchat-android-v6-kotlin-theming/SKILL.md +1 -1
  70. package/skills/cometchat-android-v6-migration/SKILL.md +398 -0
  71. package/skills/cometchat-android-v6-production/SKILL.md +1 -1
  72. package/skills/cometchat-android-v6-push/SKILL.md +1 -1
  73. package/skills/cometchat-android-v6-testing/SKILL.md +1 -1
  74. package/skills/cometchat-android-v6-troubleshooting/SKILL.md +1 -1
  75. package/skills/cometchat-angular-calls/SKILL.md +511 -0
  76. package/skills/cometchat-angular-calls/references/add-calls-to-existing-chat.md +95 -0
  77. package/skills/cometchat-angular-calls/references/call-layouts.md +106 -0
  78. package/skills/cometchat-angular-calls/references/call-session.md +167 -0
  79. package/skills/cometchat-angular-calls/references/custom-ui.md +231 -0
  80. package/skills/cometchat-angular-calls/references/device-management.md +135 -0
  81. package/skills/cometchat-angular-calls/references/group-calls.md +412 -0
  82. package/skills/cometchat-angular-calls/references/idle-timeout.md +145 -0
  83. package/skills/cometchat-angular-calls/references/in-call-chat.md +148 -0
  84. package/skills/cometchat-angular-calls/references/lazy-loading-pitfalls.md +205 -0
  85. package/skills/cometchat-angular-calls/references/migration-v4-to-v5.md +53 -0
  86. package/skills/cometchat-angular-calls/references/ngzone-and-async-callbacks.md +183 -0
  87. package/skills/cometchat-angular-calls/references/picture-in-picture.md +285 -0
  88. package/skills/cometchat-angular-calls/references/raise-hand.md +167 -0
  89. package/skills/cometchat-angular-calls/references/recording-screen-share.md +267 -0
  90. package/skills/cometchat-angular-calls/references/ringing-integration.md +131 -0
  91. package/skills/cometchat-angular-calls/references/server-web-push-vapid.md +100 -0
  92. package/skills/cometchat-angular-calls/references/share-invite.md +116 -0
  93. package/skills/cometchat-angular-components/SKILL.md +1 -1
  94. package/skills/cometchat-angular-core/SKILL.md +1 -1
  95. package/skills/cometchat-angular-customization/SKILL.md +1 -1
  96. package/skills/cometchat-angular-features/SKILL.md +1 -1
  97. package/skills/cometchat-angular-patterns/SKILL.md +1 -1
  98. package/skills/cometchat-angular-placement/SKILL.md +1 -1
  99. package/skills/cometchat-angular-production/SKILL.md +1 -1
  100. package/skills/cometchat-angular-push/SKILL.md +403 -0
  101. package/skills/cometchat-angular-testing/SKILL.md +333 -0
  102. package/skills/cometchat-angular-theming/SKILL.md +1 -1
  103. package/skills/cometchat-angular-troubleshooting/SKILL.md +1 -1
  104. package/skills/cometchat-astro-patterns/SKILL.md +1 -1
  105. package/skills/cometchat-calls/SKILL.md +358 -0
  106. package/skills/cometchat-calls/references/use-case-broadcast.md +194 -0
  107. package/skills/cometchat-calls/references/use-case-marketplace.md +158 -0
  108. package/skills/cometchat-calls/references/use-case-support.md +190 -0
  109. package/skills/cometchat-calls/references/use-case-team.md +169 -0
  110. package/skills/cometchat-calls/references/use-case-telehealth.md +154 -0
  111. package/skills/cometchat-components/SKILL.md +1 -1
  112. package/skills/cometchat-core/SKILL.md +1 -1
  113. package/skills/cometchat-customization/SKILL.md +2 -2
  114. package/skills/cometchat-features/SKILL.md +2 -2
  115. package/skills/cometchat-flutter-v5/SKILL.md +1 -1
  116. package/skills/cometchat-flutter-v5-calls/SKILL.md +325 -94
  117. package/skills/cometchat-flutter-v5-calls/references/add-calls-to-existing-chat.md +169 -0
  118. package/skills/cometchat-flutter-v5-calls/references/call-layouts.md +98 -0
  119. package/skills/cometchat-flutter-v5-calls/references/call-session.md +330 -0
  120. package/skills/cometchat-flutter-v5-calls/references/device-management.md +120 -0
  121. package/skills/cometchat-flutter-v5-calls/references/group-calls.md +187 -0
  122. package/skills/cometchat-flutter-v5-calls/references/idle-timeout.md +97 -0
  123. package/skills/cometchat-flutter-v5-calls/references/in-call-chat.md +132 -0
  124. package/skills/cometchat-flutter-v5-calls/references/migration-v4-to-v5.md +160 -0
  125. package/skills/cometchat-flutter-v5-calls/references/raise-hand.md +244 -0
  126. package/skills/cometchat-flutter-v5-calls/references/ringing-integration.md +193 -0
  127. package/skills/cometchat-flutter-v5-calls/references/server-push-bridge.md +101 -0
  128. package/skills/cometchat-flutter-v5-calls/references/share-invite.md +142 -0
  129. package/skills/cometchat-flutter-v5-conversations/SKILL.md +1 -1
  130. package/skills/cometchat-flutter-v5-core/SKILL.md +1 -1
  131. package/skills/cometchat-flutter-v5-customization/SKILL.md +1 -1
  132. package/skills/cometchat-flutter-v5-events/SKILL.md +1 -1
  133. package/skills/cometchat-flutter-v5-messages/SKILL.md +1 -1
  134. package/skills/cometchat-flutter-v5-production/SKILL.md +1 -1
  135. package/skills/cometchat-flutter-v5-push/SKILL.md +1 -1
  136. package/skills/cometchat-flutter-v5-testing/SKILL.md +390 -0
  137. package/skills/cometchat-flutter-v5-theming/SKILL.md +1 -1
  138. package/skills/cometchat-flutter-v5-troubleshooting/SKILL.md +1 -1
  139. package/skills/cometchat-flutter-v5-users-groups/SKILL.md +1 -1
  140. package/skills/cometchat-flutter-v6/SKILL.md +1 -1
  141. package/skills/cometchat-flutter-v6-calls/SKILL.md +308 -243
  142. package/skills/cometchat-flutter-v6-calls/references/add-calls-to-existing-chat.md +134 -0
  143. package/skills/cometchat-flutter-v6-calls/references/call-layouts.md +102 -0
  144. package/skills/cometchat-flutter-v6-calls/references/call-session.md +229 -0
  145. package/skills/cometchat-flutter-v6-calls/references/device-management.md +99 -0
  146. package/skills/cometchat-flutter-v6-calls/references/group-calls.md +190 -0
  147. package/skills/cometchat-flutter-v6-calls/references/idle-timeout.md +80 -0
  148. package/skills/cometchat-flutter-v6-calls/references/in-call-chat.md +122 -0
  149. package/skills/cometchat-flutter-v6-calls/references/raise-hand.md +268 -0
  150. package/skills/cometchat-flutter-v6-calls/references/ringing-integration.md +171 -0
  151. package/skills/cometchat-flutter-v6-calls/references/server-push-bridge.md +93 -0
  152. package/skills/cometchat-flutter-v6-calls/references/share-invite.md +102 -0
  153. package/skills/cometchat-flutter-v6-components/SKILL.md +1 -1
  154. package/skills/cometchat-flutter-v6-conversations/SKILL.md +1 -1
  155. package/skills/cometchat-flutter-v6-core/SKILL.md +1 -1
  156. package/skills/cometchat-flutter-v6-customization/SKILL.md +1 -1
  157. package/skills/cometchat-flutter-v6-events/SKILL.md +1 -1
  158. package/skills/cometchat-flutter-v6-features/SKILL.md +1 -1
  159. package/skills/cometchat-flutter-v6-messages/SKILL.md +1 -1
  160. package/skills/cometchat-flutter-v6-migration/SKILL.md +1 -1
  161. package/skills/cometchat-flutter-v6-placement/SKILL.md +1 -1
  162. package/skills/cometchat-flutter-v6-production/SKILL.md +1 -1
  163. package/skills/cometchat-flutter-v6-push/SKILL.md +452 -0
  164. package/skills/cometchat-flutter-v6-testing/SKILL.md +319 -0
  165. package/skills/cometchat-flutter-v6-theming/SKILL.md +1 -1
  166. package/skills/cometchat-flutter-v6-troubleshooting/SKILL.md +1 -1
  167. package/skills/cometchat-flutter-v6-users-groups/SKILL.md +1 -1
  168. package/skills/cometchat-i18n/SKILL.md +358 -0
  169. package/skills/cometchat-ios/SKILL.md +5 -5
  170. package/skills/cometchat-ios-calls/SKILL.md +409 -0
  171. package/skills/cometchat-ios-calls/references/add-calls-to-existing-chat.md +172 -0
  172. package/skills/cometchat-ios-calls/references/avaudiosession-routing.md +189 -0
  173. package/skills/cometchat-ios-calls/references/call-layouts.md +136 -0
  174. package/skills/cometchat-ios-calls/references/call-session.md +221 -0
  175. package/skills/cometchat-ios-calls/references/callkit-and-pushkit.md +353 -0
  176. package/skills/cometchat-ios-calls/references/custom-ui.md +322 -0
  177. package/skills/cometchat-ios-calls/references/device-management.md +171 -0
  178. package/skills/cometchat-ios-calls/references/group-calls.md +396 -0
  179. package/skills/cometchat-ios-calls/references/idle-timeout.md +185 -0
  180. package/skills/cometchat-ios-calls/references/in-call-chat.md +183 -0
  181. package/skills/cometchat-ios-calls/references/migration-v4-to-v5.md +138 -0
  182. package/skills/cometchat-ios-calls/references/picture-in-picture.md +246 -0
  183. package/skills/cometchat-ios-calls/references/raise-hand.md +239 -0
  184. package/skills/cometchat-ios-calls/references/recording-screen-share.md +339 -0
  185. package/skills/cometchat-ios-calls/references/ringing-integration.md +142 -0
  186. package/skills/cometchat-ios-calls/references/server-apns-pushkit.md +267 -0
  187. package/skills/cometchat-ios-calls/references/share-invite.md +152 -0
  188. package/skills/cometchat-ios-calls/references/swiftui-uikit-hosting.md +246 -0
  189. package/skills/cometchat-ios-calls/references/voip-cert-setup.md +166 -0
  190. package/skills/cometchat-ios-components/SKILL.md +1 -1
  191. package/skills/cometchat-ios-core/SKILL.md +1 -1
  192. package/skills/cometchat-ios-customization/SKILL.md +1 -1
  193. package/skills/cometchat-ios-features/SKILL.md +1 -1
  194. package/skills/cometchat-ios-placement/SKILL.md +1 -1
  195. package/skills/cometchat-ios-production/SKILL.md +1 -1
  196. package/skills/cometchat-ios-push/SKILL.md +1 -1
  197. package/skills/cometchat-ios-testing/SKILL.md +371 -0
  198. package/skills/cometchat-ios-theming/SKILL.md +1 -1
  199. package/skills/cometchat-ios-troubleshooting/SKILL.md +1 -1
  200. package/skills/cometchat-native-bare-patterns/SKILL.md +45 -3
  201. package/skills/cometchat-native-calls/SKILL.md +599 -0
  202. package/skills/cometchat-native-calls/references/add-calls-to-existing-chat.md +203 -0
  203. package/skills/cometchat-native-calls/references/call-layouts.md +124 -0
  204. package/skills/cometchat-native-calls/references/call-session.md +182 -0
  205. package/skills/cometchat-native-calls/references/custom-ui.md +250 -0
  206. package/skills/cometchat-native-calls/references/device-management.md +135 -0
  207. package/skills/cometchat-native-calls/references/expo-vs-bare.md +179 -0
  208. package/skills/cometchat-native-calls/references/group-calls.md +291 -0
  209. package/skills/cometchat-native-calls/references/idle-timeout.md +128 -0
  210. package/skills/cometchat-native-calls/references/in-call-chat.md +143 -0
  211. package/skills/cometchat-native-calls/references/migration-v4-to-v5.md +72 -0
  212. package/skills/cometchat-native-calls/references/picture-in-picture.md +276 -0
  213. package/skills/cometchat-native-calls/references/raise-hand.md +203 -0
  214. package/skills/cometchat-native-calls/references/recording-screen-share.md +290 -0
  215. package/skills/cometchat-native-calls/references/ringing-integration.md +118 -0
  216. package/skills/cometchat-native-calls/references/server-push-bridge.md +135 -0
  217. package/skills/cometchat-native-calls/references/server-push-payloads.md +193 -0
  218. package/skills/cometchat-native-calls/references/share-invite.md +144 -0
  219. package/skills/cometchat-native-calls/references/voip-push-end-to-end.md +317 -0
  220. package/skills/cometchat-native-components/SKILL.md +1 -1
  221. package/skills/cometchat-native-core/SKILL.md +1 -1
  222. package/skills/cometchat-native-customization/SKILL.md +1 -1
  223. package/skills/cometchat-native-expo-patterns/SKILL.md +18 -1
  224. package/skills/cometchat-native-features/SKILL.md +1 -1
  225. package/skills/cometchat-native-placement/SKILL.md +1 -1
  226. package/skills/cometchat-native-production/SKILL.md +1 -1
  227. package/skills/cometchat-native-push/SKILL.md +1 -1
  228. package/skills/cometchat-native-testing/SKILL.md +1 -1
  229. package/skills/cometchat-native-theming/SKILL.md +1 -1
  230. package/skills/cometchat-native-troubleshooting/SKILL.md +1 -1
  231. package/skills/cometchat-nextjs-patterns/SKILL.md +1 -1
  232. package/skills/cometchat-placement/SKILL.md +1 -1
  233. package/skills/cometchat-production/SKILL.md +1 -1
  234. package/skills/cometchat-react-calls/SKILL.md +539 -0
  235. package/skills/cometchat-react-calls/references/add-calls-to-existing-chat.md +145 -0
  236. package/skills/cometchat-react-calls/references/call-layouts.md +161 -0
  237. package/skills/cometchat-react-calls/references/call-session.md +235 -0
  238. package/skills/cometchat-react-calls/references/custom-ui.md +201 -0
  239. package/skills/cometchat-react-calls/references/device-management.md +206 -0
  240. package/skills/cometchat-react-calls/references/group-calls.md +262 -0
  241. package/skills/cometchat-react-calls/references/idle-timeout.md +175 -0
  242. package/skills/cometchat-react-calls/references/in-call-chat.md +212 -0
  243. package/skills/cometchat-react-calls/references/migration-v4-to-v5.md +172 -0
  244. package/skills/cometchat-react-calls/references/picture-in-picture.md +245 -0
  245. package/skills/cometchat-react-calls/references/raise-hand.md +238 -0
  246. package/skills/cometchat-react-calls/references/recording-screen-share.md +143 -0
  247. package/skills/cometchat-react-calls/references/ringing-integration.md +255 -0
  248. package/skills/cometchat-react-calls/references/server-web-push-vapid.md +241 -0
  249. package/skills/cometchat-react-calls/references/share-invite.md +176 -0
  250. package/skills/cometchat-react-calls/references/testing-calls-on-web.md +198 -0
  251. package/skills/cometchat-react-calls/references/voip-and-web-push.md +165 -0
  252. package/skills/cometchat-react-patterns/SKILL.md +1 -1
  253. package/skills/cometchat-react-push/SKILL.md +448 -0
  254. package/skills/cometchat-react-router-patterns/SKILL.md +1 -1
  255. package/skills/cometchat-react-testing/SKILL.md +404 -0
  256. package/skills/cometchat-theming/SKILL.md +3 -3
  257. package/skills/cometchat-troubleshooting/SKILL.md +2 -2
@@ -0,0 +1,291 @@
1
+ # Group calls (meetings) on React Native
2
+
3
+ 1:1 calls are most of what apps need. Group calls — multi-party meetings with 3-N participants — have a different set of failure modes: capacity limits, network bandwidth scaling, active-speaker UI, roster management, moderation (mute-all, kick), and capacity warnings. This reference covers them.
4
+
5
+ The Calls SDK supports group calls natively; the kit's `CometChatOngoingCall` component handles up to ~10 participants well. Beyond that, custom UI (`references/custom-ui.md`) becomes necessary.
6
+
7
+ ---
8
+
9
+ ## Signaling architecture — meeting-message broadcast, NOT call ringing
10
+
11
+ **Critical to read first.** Group calls do NOT use the Ringing channel (`CometChat.initiateCall` → `onIncomingCallReceived`). That channel is **1:1 user calls only**. The kit broadcasts a **custom message of type `"meeting"`** to the group; receivers see a "Join meeting" card in their `<CometChatMessageList />` (kit) or need an explicit `onCustomMessageReceived` listener (custom UI).
12
+
13
+ Confirmed against kit source 2026-05-15: `node_modules/@cometchat/chat-uikit-react-native/src/calls/CometChatCallButtons/CometChatCallButtons.tsx:138-201`.
14
+
15
+ ```
16
+ Caller (uid-A, member of group-X) CometChat Receivers (members of group-X)
17
+ │ │ │
18
+ │ <CometChatCallButtons group={x}> │ │
19
+ │ → CometChatUIKit.sendCustomMessage( │ │
20
+ │ CustomMessage(GUID, GROUP, │ │
21
+ │ "meeting", │ │
22
+ │ { callType, sessionId })) │ │
23
+ ├─────────────────────────────────────────>│ │
24
+ │ │ onCustomMessageReceived │
25
+ │ ├─────────────────────────────>│ (each receiver's
26
+ │ │ │ MessageListener)
27
+ │ │ │
28
+ │ caller mounts <CometChatOngoingCall │ receiver taps "Join" │
29
+ │ sessionID={GUID} /> │ → joinSession(GUID) │
30
+ │ │ <─────────────────────────── │
31
+ │ ───── WebRTC session active (sessionId = group GUID) ───── │
32
+ ```
33
+
34
+ | Channel | 1:1 user calls | Group calls |
35
+ |---|---|---|
36
+ | Signaling API | `CometChat.initiateCall(call)` | `CometChat.sendCustomMessage(meetingMessage)` |
37
+ | Receiver event | `CallListener.onIncomingCallReceived` | `MessageListener.onCustomMessageReceived` (category=CATEGORY_CUSTOM + type="meeting") |
38
+ | Session ID | server-generated unique per call | the group's GUID (persistent) |
39
+ | Ring/decline | yes — `acceptCall` / `rejectCall` | no — receivers join or ignore |
40
+ | Auto-cancel timeout | yes (45s default) | no — meeting persists in chat history |
41
+
42
+ **Implication for custom-UI receivers:** if your app doesn't render `<CometChatMessageList group={g}>` (the kit auto-renders meeting cards there), you must register your OWN `MessageListener`:
43
+
44
+ ```ts
45
+ import { CometChat } from "@cometchat/chat-sdk-react-native";
46
+
47
+ CometChat.addMessageListener(
48
+ "APP_ROOT_GROUP_MEETING_LISTENER",
49
+ new CometChat.MessageListener({
50
+ onCustomMessageReceived: (msg: CometChat.CustomMessage) => {
51
+ if (msg.getCategory() !== CometChat.CATEGORY_CUSTOM) return;
52
+ if (msg.getType() !== "meeting") return;
53
+ const customData = msg.getCustomData() as { callType?: "audio" | "video"; sessionId?: string };
54
+ const sessionId = customData.sessionId ?? msg.getReceiverId();
55
+ const callType = customData.callType ?? "video";
56
+ // Show YOUR custom incoming-meeting UI (toast, badge, or full screen)
57
+ },
58
+ }),
59
+ );
60
+ ```
61
+
62
+ **Implication for the `<CometChatIncomingCall />` overlay:** it does NOT fire for group meetings. It only listens on the 1:1 call channel. Custom UI for "incoming group meeting" must be built on top of `onCustomMessageReceived`.
63
+
64
+ This semantic surfaced on 2026-05-15 when Pixel 3 (kit-based RN) → Angular (custom UI) was tested; Angular received nothing because it only registered `addCallListener`. By design, not a bug.
65
+
66
+ ---
67
+
68
+ ## Initiating a group call
69
+
70
+ Group calls are tied to a CometChat group — the SDK uses the group's GUID as the session ID:
71
+
72
+ ```ts
73
+ import { CometChat } from "@cometchat/chat-sdk-react-native";
74
+
75
+ const group = await CometChat.getGroup(guid);
76
+
77
+ // initiate a video call to the group
78
+ const call = new CometChat.Call(group.getGuid(), CometChat.CALL_TYPE.VIDEO, CometChat.RECEIVER_TYPE.GROUP);
79
+ const initiated = await CometChat.initiateCall(call);
80
+
81
+ // All currently-online group members receive an incoming-call notification
82
+ ```
83
+
84
+ Different from 1:1: the receiver is the GROUP, not a single user. Anyone in the group can join via `acceptCall` until the call ends.
85
+
86
+ ---
87
+
88
+ ## Capacity limits
89
+
90
+ CometChat plan-driven. Common ceilings:
91
+
92
+ | Plan | Max participants per call |
93
+ |---|---|
94
+ | Free | 5 |
95
+ | Developer | 10 |
96
+ | Production | 25 |
97
+ | Enterprise | configurable up to 100 |
98
+
99
+ The SDK doesn't reject calls at capacity — it just stops admitting new joiners with `OngoingCallListener.onError` firing on the would-be joiner's side. Surface this to the user:
100
+
101
+ ```ts
102
+ const listener = new CometChatCalls.OngoingCallListener({
103
+ onError: (error: { code: string; message: string }) => {
104
+ if (error.code === "ERR_CALL_FULL") {
105
+ Alert.alert("Call is full", "This meeting has reached its participant limit.");
106
+ }
107
+ },
108
+ });
109
+ ```
110
+
111
+ ---
112
+
113
+ ## Roster — who's in the call
114
+
115
+ ```ts
116
+ const listener = new CometChatCalls.OngoingCallListener({
117
+ onUserListUpdated: (users: Array<{ uid: string; name: string; avatar?: string }>) => {
118
+ // Re-render the participant strip
119
+ setParticipants(users);
120
+ },
121
+ });
122
+ ```
123
+
124
+ Fires whenever a participant joins or leaves. The roster includes the local user — filter them out of the "remote participants" UI:
125
+
126
+ ```ts
127
+ const localUid = CometChat.getLoggedinUser()?.getUid();
128
+ const remoteParticipants = users.filter((u) => u.uid !== localUid);
129
+ ```
130
+
131
+ ---
132
+
133
+ ## Active speaker detection
134
+
135
+ The SDK fires `onActiveSpeakerUpdated` when the dominant audio source changes:
136
+
137
+ ```ts
138
+ const listener = new CometChatCalls.OngoingCallListener({
139
+ onActiveSpeakerUpdated: (uid: string) => {
140
+ setActiveSpeakerUid(uid);
141
+ },
142
+ });
143
+ ```
144
+
145
+ Use this to drive a "spotlight" layout — large tile for the active speaker, small thumbnails for the rest:
146
+
147
+ ```tsx
148
+ function SpotlightLayout({ participants, activeSpeakerUid }: Props) {
149
+ const speaker = participants.find((p) => p.uid === activeSpeakerUid) ?? participants[0];
150
+ const others = participants.filter((p) => p.uid !== speaker?.uid);
151
+
152
+ return (
153
+ <View style={styles.spotlight}>
154
+ <ParticipantTile participant={speaker} large />
155
+ <ScrollView horizontal>
156
+ {others.map((p) => (
157
+ <ParticipantTile key={p.uid} participant={p} small />
158
+ ))}
159
+ </ScrollView>
160
+ </View>
161
+ );
162
+ }
163
+ ```
164
+
165
+ **Throttle re-layout** — `onActiveSpeakerUpdated` can fire multiple times per second in a noisy room. Debounce the layout swap to ~500ms minimum, otherwise tiles jitter.
166
+
167
+ ---
168
+
169
+ ## Mute-all / kick / raise hand — moderator actions
170
+
171
+ These require the local user to be a group **owner** or **moderator** (CometChat group scopes):
172
+
173
+ ```ts
174
+ import { CometChatCalls } from "@cometchat/calls-sdk-react-native";
175
+
176
+ // Mute a specific participant (moderator action — kicks them off audio)
177
+ async function mutParticipant(uid: string) {
178
+ await CometChatCalls.muteUser(uid);
179
+ }
180
+
181
+ // Mute everyone except local user
182
+ async function muteAll() {
183
+ for (const p of participants) {
184
+ if (p.uid === localUid) continue;
185
+ await CometChatCalls.muteUser(p.uid);
186
+ }
187
+ }
188
+
189
+ // Kick a participant out of the call
190
+ async function kickParticipant(uid: string) {
191
+ await CometChatCalls.removeUser(uid);
192
+ }
193
+
194
+ // Local user "raises hand" — signals to moderator
195
+ async function raiseHand() {
196
+ await CometChatCalls.raiseHand();
197
+ // The moderator's onUserRaisedHand listener fires
198
+ }
199
+ ```
200
+
201
+ **Permission check** — call these only if the local user has moderator scope:
202
+
203
+ ```ts
204
+ const localScope = group.getScope(); // "admin" | "moderator" | "participant"
205
+ const canModerate = localScope === "admin" || localScope === "moderator";
206
+ ```
207
+
208
+ Don't render mute-all/kick buttons for non-moderators.
209
+
210
+ ---
211
+
212
+ ## Bandwidth scaling — quality vs participant count
213
+
214
+ WebRTC mesh topology (every peer connects to every other peer) doesn't scale. CometChat uses an SFU (Selective Forwarding Unit) for group calls — your client uploads one stream, downloads N streams.
215
+
216
+ Practical bandwidth (per local user, video on):
217
+
218
+ | Participants | Upload | Download |
219
+ |---|---|---|
220
+ | 2 | 1 Mbps | 1 Mbps |
221
+ | 5 | 1 Mbps | 5 Mbps |
222
+ | 10 | 1 Mbps | 10 Mbps |
223
+ | 25 | 1 Mbps | 25 Mbps |
224
+
225
+ Mobile networks struggle past 10. The skill recommends:
226
+
227
+ - Cap default participant count at 10 for mobile-only audiences
228
+ - Auto-disable video for participants beyond the spotlight + 4 most-recent speakers (custom UI)
229
+ - Switch to audio-only mode if the device's battery drops below 20% (`expo-battery` or custom native module)
230
+
231
+ ```ts
232
+ // auto-downgrade to audio-only on low battery
233
+ import * as Battery from "expo-battery";
234
+
235
+ const level = await Battery.getBatteryLevelAsync();
236
+ if (level < 0.2) {
237
+ await CometChatCalls.pauseVideo(true);
238
+ Alert.alert("Battery saver", "Video paused to save battery.");
239
+ }
240
+ ```
241
+
242
+ ---
243
+
244
+ ## Joining a group call already in progress
245
+
246
+ If User A starts the call and the group has 5 members, the other 4 receive an incoming-call notification. But what about User B who logs in DURING the call?
247
+
248
+ The CometChat backend stores active call state. A joining user can query:
249
+
250
+ ```ts
251
+ const ongoing = await CometChat.getActiveCall();
252
+ if (ongoing && ongoing.getReceiverType() === CometChat.RECEIVER_TYPE.GROUP) {
253
+ // Show "Join meeting" button — call is in progress
254
+ }
255
+ ```
256
+
257
+ Use this to render a "Join meeting" button on the group screen during an active call. The kit's `CometChatMessageHeader` does this automatically when the group has an active call.
258
+
259
+ ---
260
+
261
+ ## Anti-patterns
262
+
263
+ 1. **Rendering tiles for every participant.** At 25 people, you have 25 `<RTCView />` instances; that's where RN's bridge starts choking. Render the active speaker + max 6 thumbnails.
264
+ 2. **Updating layout on every `onActiveSpeakerUpdated`.** Debounce to 500ms minimum.
265
+ 3. **Allowing non-moderators to call `muteUser` / `removeUser`.** SDK rejects, but the UI shouldn't expose buttons for it.
266
+ 4. **No bandwidth warning.** A user on cellular joining a 10-person call burns their data plan in minutes. Show a "Switch to audio-only" prompt at the threshold.
267
+ 5. **Forgetting to filter local user from the roster.** "Speaking with myself" tile.
268
+ 6. **Initiating group calls without group membership check.** Non-members get "ERR_NOT_GROUP_MEMBER" silently.
269
+
270
+ ---
271
+
272
+ ## Verification checklist
273
+
274
+ - [ ] Active-speaker handler debounced (≥500ms)
275
+ - [ ] Roster filters out local user
276
+ - [ ] Moderator buttons hidden for non-moderator scopes
277
+ - [ ] Capacity error surfaces in UI when join fails
278
+ - [ ] Bandwidth warning at participant count threshold (configurable)
279
+ - [ ] Battery-saver downgrade hook (optional, recommended)
280
+ - [ ] `getActiveCall()` checked on group screen mount
281
+ - [ ] Maximum N tiles rendered (clamp + overflow indicator: "+5 more")
282
+ - [ ] Real-device smoke: 5+ participants on real cellular network for 5+ minutes
283
+
284
+ ---
285
+
286
+ ## Pointers
287
+
288
+ - `references/custom-ui.md` — building custom multi-tile layouts on the SDK
289
+ - `references/recording-screen-share.md` — recording group calls (server-side composition handles the layout)
290
+ - `references/voip-push-end-to-end.md` — push for group call invitations
291
+ - `cometchat-native-calls` SKILL.md — base hard rules
@@ -0,0 +1,128 @@
1
+ # Idle timeout on React Native
2
+
3
+ Same SDK API as web — `setIdleTimeoutPeriodBeforePrompt` + `setIdleTimeoutPeriodAfterPrompt` on CallSettings, `onSessionTimedOut` event. RN-specific deltas are background-handling integration (call doesn't time out while the app is foregrounded; needs special handling in background) and the alert UI surface.
4
+
5
+ **Canonical docs:** https://www.cometchat.com/docs/calls/react-native/idle-timeout
6
+ **Read first:** `cometchat-react-calls/references/idle-timeout.md` — settings shape + recommended timeouts per archetype + custom prompt pattern.
7
+
8
+ ---
9
+
10
+ ## SDK API
11
+
12
+ ```ts
13
+ import { CometChatCalls } from "@cometchat/calls-sdk-react-native";
14
+
15
+ const settings = new CometChatCalls.CallSettingsBuilder()
16
+ .setSessionID(sessionId)
17
+ .setIdleTimeoutPeriodBeforePrompt(60_000)
18
+ .setIdleTimeoutPeriodAfterPrompt(120_000)
19
+ .build();
20
+
21
+ CometChatCalls.addEventListener("onSessionTimedOut", () => {
22
+ navigation.navigate("Home");
23
+ Alert.alert("Call ended", "You were inactive for too long");
24
+ });
25
+ ```
26
+
27
+ ---
28
+
29
+ ## RN-specific: app state + idle interaction
30
+
31
+ **Background gotcha:** when the user backgrounds your app while the call is active, the idle timer keeps running. From the user's perspective, they backgrounded for 30s and came back to a "you've been timed out" screen. Bad UX.
32
+
33
+ Pause the timer when the app backgrounds:
34
+
35
+ ```ts
36
+ import { AppState } from "react-native";
37
+
38
+ useEffect(() => {
39
+ const sub = AppState.addEventListener("change", (state) => {
40
+ if (state === "active") {
41
+ // App came back to foreground — reset alone-since timer
42
+ // (Without SDK API to pause; reconfigure call settings is the workaround)
43
+ } else if (state === "background") {
44
+ // Pause your custom timer (Pattern A in the web ref)
45
+ }
46
+ });
47
+ return () => sub.remove();
48
+ }, []);
49
+ ```
50
+
51
+ If you're using the kit's default idle prompt UI, this is harder — kit doesn't expose a "pause timer" API. Use Pattern B from the web ref (long SDK timeouts + custom prompt + custom timer that respects AppState).
52
+
53
+ ---
54
+
55
+ ## Custom prompt — Alert vs Modal
56
+
57
+ `Alert.alert` is OS-native but blocks the call UI fully:
58
+
59
+ ```ts
60
+ useEffect(() => {
61
+ if (!showPrompt) return;
62
+ const subscription = Alert.alert(
63
+ "Still there?",
64
+ "You're alone in this call. It'll end in 60 seconds.",
65
+ [
66
+ { text: "Stay", onPress: dismiss, style: "cancel" },
67
+ { text: "End now", onPress: () => CometChatCalls.leaveSession(), style: "destructive" },
68
+ ],
69
+ { cancelable: false },
70
+ );
71
+ }, [showPrompt]);
72
+ ```
73
+
74
+ `Modal` lets you keep the call surface visible:
75
+
76
+ ```tsx
77
+ <Modal
78
+ visible={showPrompt}
79
+ transparent
80
+ animationType="fade"
81
+ onRequestClose={dismiss}
82
+ >
83
+ <View style={styles.overlay}>
84
+ <View style={styles.dialog} accessible accessibilityRole="alert">
85
+ <Text style={styles.title}>Still there?</Text>
86
+ <Text>You're alone in this call. It'll end in 60 seconds.</Text>
87
+ <View style={styles.row}>
88
+ <TouchableOpacity onPress={dismiss}><Text>Stay</Text></TouchableOpacity>
89
+ <TouchableOpacity onPress={() => CometChatCalls.leaveSession()}>
90
+ <Text style={{ color: "red" }}>End now</Text>
91
+ </TouchableOpacity>
92
+ </View>
93
+ </View>
94
+ </View>
95
+ </Modal>
96
+ ```
97
+
98
+ `accessibilityRole="alert"` is the RN equivalent of web's `role="alertdialog"`. TalkBack / VoiceOver pause to announce.
99
+
100
+ ---
101
+
102
+ ## Anti-patterns
103
+
104
+ Web sister reference rules apply, plus RN-specific:
105
+
106
+ 1. **Idle timer running during background.** User backgrounds, comes back to "timed out." Pause via AppState listener.
107
+ 2. **Using `Alert.alert` inside `useEffect`.** Blocks the call surface; can stack multiple alerts on rapid state changes. Use `Modal` for in-call UI.
108
+ 3. **Forgetting `Modal` `accessible accessibilityRole="alert"`.** Screen readers miss the announcement.
109
+
110
+ ---
111
+
112
+ ## Verification checklist
113
+
114
+ - [ ] CallSettings sets both idle periods
115
+ - [ ] `onSessionTimedOut` navigates user away cleanly
116
+ - [ ] Custom prompt uses `Modal` with `accessibilityRole="alert"`, OR `Alert.alert` for OS-native
117
+ - [ ] AppState listener pauses custom timer on `background`
118
+ - [ ] Real-device smoke: backgroound app for 30s, return → call still active (timer paused correctly)
119
+ - [ ] Real-device smoke: 2 devices, hangup from one → timer fires on the other after configured delay
120
+
121
+ ---
122
+
123
+ ## Pointers
124
+
125
+ - `cometchat-react-calls/references/idle-timeout.md` — sister reference (settings, archetype timeouts, custom prompt pattern)
126
+ - `cometchat-native-calls` SKILL.md
127
+ - `references/voip-push-end-to-end.md` — interaction with VoIP push (background-mode call activation)
128
+ - Canonical docs: https://www.cometchat.com/docs/calls/react-native/idle-timeout
@@ -0,0 +1,143 @@
1
+ # In-call chat on React Native
2
+
3
+ Same SDK API as web. RN-specific: BottomSheet panel UX (matches mobile patterns) + `Keyboard.dismiss()` lifecycle awareness when entering call.
4
+
5
+ **Canonical docs:** https://www.cometchat.com/docs/calls/react-native/in-call-chat
6
+ **Read first:** `cometchat-react-calls/references/in-call-chat.md` — group-as-session architecture + UX patterns + the four anti-patterns.
7
+
8
+ ---
9
+
10
+ ## SDK API
11
+
12
+ ```ts
13
+ import { CometChatCalls } from "@cometchat/calls-sdk-react-native";
14
+
15
+ const settings = new CometChatCalls.CallSettingsBuilder()
16
+ .setSessionID(sessionId)
17
+ .hideChatButton(false)
18
+ .build();
19
+
20
+ CometChatCalls.addEventListener("onChatButtonClicked", () => setOpen(true));
21
+ CometChatCalls.setChatButtonUnreadCount(5);
22
+ ```
23
+
24
+ Same as web. The group-as-session pattern (using a group with GUID == sessionID) carries over.
25
+
26
+ ---
27
+
28
+ ## BottomSheet panel — RN canonical UX
29
+
30
+ ```tsx
31
+ import BottomSheet, { BottomSheetView } from "@gorhom/bottom-sheet";
32
+ import { useRef, useEffect, useState } from "react";
33
+ import { View, TextInput, TouchableOpacity, Text } from "react-native";
34
+ import { CometChat } from "@cometchat/chat-sdk-react-native";
35
+ import { CometChatCalls } from "@cometchat/calls-sdk-react-native";
36
+ import {
37
+ CometChatMessageList,
38
+ CometChatMessageComposer,
39
+ } from "@cometchat/chat-uikit-react-native";
40
+
41
+ interface Props { sessionId: string; }
42
+
43
+ function InCallChatSheet({ sessionId }: Props) {
44
+ const sheetRef = useRef<BottomSheet>(null);
45
+ const [group, setGroup] = useState<CometChat.Group>();
46
+ const [unread, setUnread] = useState(0);
47
+
48
+ useEffect(() => {
49
+ const handler = () => sheetRef.current?.snapToIndex(1);
50
+ CometChatCalls.addEventListener("onChatButtonClicked", handler);
51
+ return () => CometChatCalls.removeEventListener("onChatButtonClicked", handler);
52
+ }, []);
53
+
54
+ useEffect(() => {
55
+ CometChat.getGroup(sessionId).then(setGroup).catch(() => {});
56
+ }, [sessionId]);
57
+
58
+ // Track unread + clear on open (same logic as web; cite sister)
59
+ // ...
60
+
61
+ if (!group) return null;
62
+
63
+ return (
64
+ <BottomSheet
65
+ ref={sheetRef}
66
+ snapPoints={["10%", "75%"]}
67
+ index={-1} // start closed
68
+ onChange={(i) => {
69
+ if (i >= 1) {
70
+ setUnread(0);
71
+ CometChatCalls.setChatButtonUnreadCount(0);
72
+ }
73
+ }}
74
+ >
75
+ <BottomSheetView style={{ flex: 1 }}>
76
+ {/* flex-1 + minHeight:0 wrap pattern still applies on RN */}
77
+ <View style={{ flex: 1, minHeight: 0 }}>
78
+ <CometChatMessageList group={group} hideReplyInThreadOption />
79
+ </View>
80
+ <CometChatMessageComposer group={group} />
81
+ </BottomSheetView>
82
+ </BottomSheet>
83
+ );
84
+ }
85
+ ```
86
+
87
+ `@gorhom/bottom-sheet` is already a peer dep of the kit when RN calls are integrated (via `react-native-gesture-handler` + `react-native-reanimated`).
88
+
89
+ ---
90
+
91
+ ## Keyboard handling
92
+
93
+ When the chat sheet opens, the user types — keyboard appears, pushes call surface up. Two options:
94
+
95
+ ### A — Use `KeyboardAvoidingView`
96
+
97
+ ```tsx
98
+ <KeyboardAvoidingView
99
+ behavior={Platform.OS === "ios" ? "padding" : "height"}
100
+ style={{ flex: 1 }}
101
+ >
102
+ <BottomSheet ...>
103
+ {/* ... */}
104
+ </BottomSheet>
105
+ </KeyboardAvoidingView>
106
+ ```
107
+
108
+ ### B — Use `keyboardVerticalOffset` from BottomSheet
109
+
110
+ Most BottomSheet libs have explicit keyboard handling. `@gorhom/bottom-sheet` v4+ ships `keyboardBehavior` and `keyboardBlurBehavior` options.
111
+
112
+ Critical: ensure the call's WebRTC video doesn't reflow when keyboard opens (already covered by `resizeToAvoidBottomInset: false` rule for iOS; on Android use `android:windowSoftInputMode="adjustNothing"` in the manifest for the call activity).
113
+
114
+ ---
115
+
116
+ ## Anti-patterns
117
+
118
+ Web sister rules apply, plus RN-specific:
119
+
120
+ 1. **Default `windowSoftInputMode="adjustResize"`** on Android. Keyboard appears, the entire screen resizes — call's WebRTC view squishes, looks broken.
121
+ 2. **`@gorhom/bottom-sheet` outside `GestureHandlerRootView`.** Sheet doesn't respond to drag gestures. Wrap your app's root in `GestureHandlerRootView` (also a kit requirement; see `cometchat-native-calls` SKILL.md).
122
+ 3. **Chat sheet fullscreen by default.** Hides the call view; participants can't see who's talking. Default to ~30% snap, expand on demand.
123
+
124
+ ---
125
+
126
+ ## Verification checklist
127
+
128
+ - [ ] `@gorhom/bottom-sheet` in deps
129
+ - [ ] `GestureHandlerRootView` wraps the app
130
+ - [ ] BottomSheet has 2+ snap points (peek + expanded)
131
+ - [ ] AndroidManifest: call activity has `windowSoftInputMode="adjustNothing"` or `"adjustPan"`
132
+ - [ ] iOS Scaffold: `resizeToAvoidBottomInset: false` (RN's equivalent: KeyboardAvoidingView with right behavior)
133
+ - [ ] Real-device smoke: keyboard opens during chat, call view doesn't reflow
134
+ - [ ] Real-device smoke: 2 devices in call, send message from one → badge appears in other
135
+
136
+ ---
137
+
138
+ ## Pointers
139
+
140
+ - `cometchat-react-calls/references/in-call-chat.md` — sister web reference (group-as-session pattern)
141
+ - `cometchat-native-calls` SKILL.md — the seven hard rules
142
+ - `cometchat-android-v5-calls/references/in-call-chat.md` — Android V5 sibling
143
+ - Canonical docs: https://www.cometchat.com/docs/calls/react-native/in-call-chat
@@ -0,0 +1,72 @@
1
+ # Calls SDK v4 → v5 migration (React Native)
2
+
3
+ `@cometchat/calls-sdk-react-native@5` is a drop-in replacement for v4. Same migration shape as web; RN deltas focus on the native modules that calls SDK depends on.
4
+
5
+ **Read first:** `cometchat-react-calls/references/migration-v4-to-v5.md` — canonical step-by-step (init, login, settings, events, methods).
6
+
7
+ ---
8
+
9
+ ## Step 1 — Bump the package + native modules
10
+
11
+ ```bash
12
+ npm install @cometchat/calls-sdk-react-native@5
13
+ cd ios && pod install
14
+ ```
15
+
16
+ If you upgraded `react-native-webrtc` along with the calls SDK, run:
17
+
18
+ ```bash
19
+ # iOS
20
+ cd ios && rm -rf Pods Podfile.lock && pod install
21
+ # Android (Gradle handles it on next build)
22
+ ```
23
+
24
+ ---
25
+
26
+ ## Step 2 — Verify native dependencies are still valid
27
+
28
+ Calls SDK v5 doesn't change the native module list, but versions matter. Check `package.json`:
29
+
30
+ ```json
31
+ {
32
+ "dependencies": {
33
+ "@cometchat/calls-sdk-react-native": "^5.0.0",
34
+ "react-native-webrtc": ">=124",
35
+ "react-native-incall-manager": ">=4",
36
+ "react-native-callstats": ">=3",
37
+ "@react-native-community/netinfo": "*"
38
+ }
39
+ }
40
+ ```
41
+
42
+ If any of these are stale, calls may fail silently with WebRTC negotiation errors.
43
+
44
+ ---
45
+
46
+ ## Migration steps (same as web)
47
+
48
+ 1. Migrate init to plain object
49
+ 2. Add `CometChatCalls.login(authToken)` after `CometChat.login`
50
+ 3. Replace `CallSettingsBuilder` with plain `sessionSettings` object — **watch inverted booleans** (`show*` → `hide*`)
51
+ 4. Replace `OngoingCallListener` with `addEventListener` calls
52
+ 5. Rename methods: `endSession` → `leaveSession`, `startSession` → `joinSession`, `setMode` → `setLayout`
53
+ 6. Cleanup: `addEventListener` returns an unsubscribe — call it on unmount
54
+
55
+ ---
56
+
57
+ ## Verification checklist
58
+
59
+ - [ ] All canonical steps from `cometchat-react-calls/references/migration-v4-to-v5.md`
60
+ - [ ] `pod install` re-run after upgrade
61
+ - [ ] Native modules at compatible versions
62
+ - [ ] Real-device test: 2 phones (iOS + Android), incoming call, mute, screen-share, end
63
+ - [ ] CallKeep + VoipPushNotification still register tokens correctly
64
+ - [ ] Background incoming call (recipient app killed) still rings
65
+
66
+ ---
67
+
68
+ ## Pointers
69
+
70
+ - Canonical migration: `cometchat-react-calls/references/migration-v4-to-v5.md`
71
+ - `cometchat-native-calls/SKILL.md` — RN seven hard rules
72
+ - https://www.cometchat.com/docs/calls/react-native/migration-guide-v5