@cometchat/skills 4.2.1 → 4.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (234) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +33 -12
  3. package/bin/install.js +59 -4
  4. package/package.json +14 -1
  5. package/skills/cometchat/SKILL.md +460 -77
  6. package/skills/cometchat/references/asking-questions.md +48 -0
  7. package/skills/cometchat-a11y/SKILL.md +3 -2
  8. package/skills/cometchat-android-v5/SKILL.md +2 -1
  9. package/skills/cometchat-android-v5-calls/SKILL.md +36 -22
  10. package/skills/cometchat-android-v5-calls/references/README.md +1 -1
  11. package/skills/cometchat-android-v5-calls/references/add-calls-to-existing-chat.md +7 -5
  12. package/skills/cometchat-android-v5-calls/references/audio-controls.md +4 -4
  13. package/skills/cometchat-android-v5-calls/references/call-layouts.md +33 -25
  14. package/skills/cometchat-android-v5-calls/references/call-session.md +2 -2
  15. package/skills/cometchat-android-v5-calls/references/custom-ui.md +5 -5
  16. package/skills/cometchat-android-v5-calls/references/event-listeners.md +2 -2
  17. package/skills/cometchat-android-v5-calls/references/idle-timeout.md +20 -14
  18. package/skills/cometchat-android-v5-calls/references/in-call-chat.md +1 -1
  19. package/skills/cometchat-android-v5-calls/references/migration-v4-to-v5.md +43 -27
  20. package/skills/cometchat-android-v5-calls/references/participant-management.md +3 -3
  21. package/skills/cometchat-android-v5-calls/references/raise-hand.md +25 -19
  22. package/skills/cometchat-android-v5-calls/references/recording.md +2 -2
  23. package/skills/cometchat-android-v5-calls/references/ringing-integration.md +1 -1
  24. package/skills/cometchat-android-v5-calls/references/screen-sharing.md +5 -9
  25. package/skills/cometchat-android-v5-calls/references/session-settings.md +3 -3
  26. package/skills/cometchat-android-v5-calls/references/setup.md +1 -1
  27. package/skills/cometchat-android-v5-calls/references/share-invite.md +9 -4
  28. package/skills/cometchat-android-v5-calls/references/video-controls.md +4 -4
  29. package/skills/cometchat-android-v5-calls/references/voip-calling.md +2 -2
  30. package/skills/cometchat-android-v5-components/SKILL.md +4 -3
  31. package/skills/cometchat-android-v5-core/SKILL.md +20 -2
  32. package/skills/cometchat-android-v5-customization/SKILL.md +171 -7
  33. package/skills/cometchat-android-v5-extensions/SKILL.md +7 -4
  34. package/skills/cometchat-android-v5-features/SKILL.md +5 -4
  35. package/skills/cometchat-android-v5-placement/SKILL.md +2 -1
  36. package/skills/cometchat-android-v5-production/SKILL.md +2 -1
  37. package/skills/cometchat-android-v5-push/SKILL.md +2 -3
  38. package/skills/cometchat-android-v5-testing/SKILL.md +2 -1
  39. package/skills/cometchat-android-v5-theming/SKILL.md +2 -1
  40. package/skills/cometchat-android-v5-troubleshooting/SKILL.md +3 -2
  41. package/skills/cometchat-android-v6/SKILL.md +2 -1
  42. package/skills/cometchat-android-v6-builder-settings/SKILL.md +11 -7
  43. package/skills/cometchat-android-v6-calls/SKILL.md +79 -18
  44. package/skills/cometchat-android-v6-calls/references/advanced-features.md +87 -0
  45. package/skills/cometchat-android-v6-calls/references/call-layouts.md +24 -15
  46. package/skills/cometchat-android-v6-calls/references/call-session.md +2 -2
  47. package/skills/cometchat-android-v6-calls/references/device-management.md +17 -16
  48. package/skills/cometchat-android-v6-calls/references/idle-timeout.md +7 -4
  49. package/skills/cometchat-android-v6-calls/references/in-call-chat.md +13 -8
  50. package/skills/cometchat-android-v6-calls/references/raise-hand.md +6 -4
  51. package/skills/cometchat-android-v6-compose-components/SKILL.md +52 -29
  52. package/skills/cometchat-android-v6-compose-customization/SKILL.md +156 -1
  53. package/skills/cometchat-android-v6-compose-placement/SKILL.md +129 -40
  54. package/skills/cometchat-android-v6-compose-theming/SKILL.md +27 -1
  55. package/skills/cometchat-android-v6-core/SKILL.md +389 -9
  56. package/skills/cometchat-android-v6-events/SKILL.md +4 -1
  57. package/skills/cometchat-android-v6-extensions/SKILL.md +2 -1
  58. package/skills/cometchat-android-v6-features/SKILL.md +26 -2
  59. package/skills/cometchat-android-v6-kotlin-components/SKILL.md +31 -1
  60. package/skills/cometchat-android-v6-kotlin-customization/SKILL.md +172 -1
  61. package/skills/cometchat-android-v6-kotlin-placement/SKILL.md +20 -5
  62. package/skills/cometchat-android-v6-kotlin-theming/SKILL.md +36 -5
  63. package/skills/cometchat-android-v6-migration/SKILL.md +44 -42
  64. package/skills/cometchat-android-v6-production/SKILL.md +6 -3
  65. package/skills/cometchat-android-v6-push/SKILL.md +43 -2
  66. package/skills/cometchat-android-v6-testing/SKILL.md +11 -8
  67. package/skills/cometchat-android-v6-troubleshooting/SKILL.md +26 -5
  68. package/skills/cometchat-angular-calls/SKILL.md +256 -389
  69. package/skills/cometchat-angular-calls/references/add-calls-to-existing-chat.md +3 -2
  70. package/skills/cometchat-angular-calls/references/call-layouts.md +29 -12
  71. package/skills/cometchat-angular-calls/references/call-session.md +2 -2
  72. package/skills/cometchat-angular-calls/references/custom-ui.md +18 -10
  73. package/skills/cometchat-angular-calls/references/device-management.md +53 -34
  74. package/skills/cometchat-angular-calls/references/group-calls.md +45 -24
  75. package/skills/cometchat-angular-calls/references/idle-timeout.md +31 -15
  76. package/skills/cometchat-angular-calls/references/ngzone-and-async-callbacks.md +7 -6
  77. package/skills/cometchat-angular-calls/references/raise-hand.md +9 -4
  78. package/skills/cometchat-angular-calls/references/recording-screen-share.md +32 -39
  79. package/skills/cometchat-angular-calls/references/ringing-integration.md +3 -1
  80. package/skills/cometchat-angular-calls/references/share-invite.md +11 -5
  81. package/skills/cometchat-angular-calls/references/virtual-background.md +29 -0
  82. package/skills/cometchat-angular-components/SKILL.md +149 -620
  83. package/skills/cometchat-angular-core/SKILL.md +235 -293
  84. package/skills/cometchat-angular-customization/SKILL.md +415 -223
  85. package/skills/cometchat-angular-features/SKILL.md +216 -334
  86. package/skills/cometchat-angular-patterns/SKILL.md +168 -359
  87. package/skills/cometchat-angular-placement/SKILL.md +189 -560
  88. package/skills/cometchat-angular-production/SKILL.md +241 -92
  89. package/skills/cometchat-angular-push/SKILL.md +280 -294
  90. package/skills/cometchat-angular-testing/SKILL.md +430 -158
  91. package/skills/cometchat-angular-theming/SKILL.md +190 -265
  92. package/skills/cometchat-angular-troubleshooting/SKILL.md +192 -157
  93. package/skills/cometchat-astro-patterns/SKILL.md +22 -1
  94. package/skills/cometchat-calls/SKILL.md +25 -19
  95. package/skills/cometchat-calls/references/use-case-broadcast.md +15 -10
  96. package/skills/cometchat-calls/references/use-case-marketplace.md +2 -3
  97. package/skills/cometchat-calls/references/use-case-support.md +3 -4
  98. package/skills/cometchat-calls/references/use-case-team.md +23 -12
  99. package/skills/cometchat-calls/references/use-case-telehealth.md +3 -4
  100. package/skills/cometchat-components/SKILL.md +163 -25
  101. package/skills/cometchat-core/SKILL.md +412 -13
  102. package/skills/cometchat-customization/SKILL.md +50 -25
  103. package/skills/cometchat-features/SKILL.md +313 -34
  104. package/skills/cometchat-flutter-v5/SKILL.md +10 -4
  105. package/skills/cometchat-flutter-v5-calls/SKILL.md +188 -158
  106. package/skills/cometchat-flutter-v5-calls/references/add-calls-to-existing-chat.md +48 -24
  107. package/skills/cometchat-flutter-v5-calls/references/call-layouts.md +20 -15
  108. package/skills/cometchat-flutter-v5-calls/references/call-session.md +100 -145
  109. package/skills/cometchat-flutter-v5-calls/references/device-management.md +12 -8
  110. package/skills/cometchat-flutter-v5-calls/references/group-calls.md +30 -36
  111. package/skills/cometchat-flutter-v5-calls/references/idle-timeout.md +15 -13
  112. package/skills/cometchat-flutter-v5-calls/references/in-call-chat.md +12 -9
  113. package/skills/cometchat-flutter-v5-calls/references/migration-v4-to-v5.md +115 -65
  114. package/skills/cometchat-flutter-v5-calls/references/raise-hand.md +41 -30
  115. package/skills/cometchat-flutter-v5-calls/references/ringing-integration.md +17 -14
  116. package/skills/cometchat-flutter-v5-calls/references/share-invite.md +8 -2
  117. package/skills/cometchat-flutter-v5-conversations/SKILL.md +2 -1
  118. package/skills/cometchat-flutter-v5-core/SKILL.md +20 -2
  119. package/skills/cometchat-flutter-v5-customization/SKILL.md +136 -5
  120. package/skills/cometchat-flutter-v5-events/SKILL.md +2 -1
  121. package/skills/cometchat-flutter-v5-messages/SKILL.md +2 -1
  122. package/skills/cometchat-flutter-v5-production/SKILL.md +15 -6
  123. package/skills/cometchat-flutter-v5-push/SKILL.md +2 -1
  124. package/skills/cometchat-flutter-v5-testing/SKILL.md +17 -6
  125. package/skills/cometchat-flutter-v5-theming/SKILL.md +2 -1
  126. package/skills/cometchat-flutter-v5-troubleshooting/SKILL.md +7 -6
  127. package/skills/cometchat-flutter-v5-users-groups/SKILL.md +3 -2
  128. package/skills/cometchat-flutter-v6/SKILL.md +17 -16
  129. package/skills/cometchat-flutter-v6-calls/SKILL.md +78 -63
  130. package/skills/cometchat-flutter-v6-calls/references/add-calls-to-existing-chat.md +8 -6
  131. package/skills/cometchat-flutter-v6-calls/references/advanced-features.md +89 -0
  132. package/skills/cometchat-flutter-v6-calls/references/call-layouts.md +15 -12
  133. package/skills/cometchat-flutter-v6-calls/references/call-session.md +2 -2
  134. package/skills/cometchat-flutter-v6-calls/references/device-management.md +9 -3
  135. package/skills/cometchat-flutter-v6-calls/references/group-calls.md +10 -10
  136. package/skills/cometchat-flutter-v6-calls/references/idle-timeout.md +15 -7
  137. package/skills/cometchat-flutter-v6-calls/references/in-call-chat.md +6 -3
  138. package/skills/cometchat-flutter-v6-calls/references/raise-hand.md +23 -16
  139. package/skills/cometchat-flutter-v6-components/SKILL.md +32 -11
  140. package/skills/cometchat-flutter-v6-conversations/SKILL.md +39 -11
  141. package/skills/cometchat-flutter-v6-core/SKILL.md +348 -10
  142. package/skills/cometchat-flutter-v6-customization/SKILL.md +97 -25
  143. package/skills/cometchat-flutter-v6-events/SKILL.md +3 -2
  144. package/skills/cometchat-flutter-v6-features/SKILL.md +15 -6
  145. package/skills/cometchat-flutter-v6-messages/SKILL.md +111 -60
  146. package/skills/cometchat-flutter-v6-migration/SKILL.md +18 -25
  147. package/skills/cometchat-flutter-v6-placement/SKILL.md +79 -50
  148. package/skills/cometchat-flutter-v6-production/SKILL.md +13 -12
  149. package/skills/cometchat-flutter-v6-push/SKILL.md +43 -21
  150. package/skills/cometchat-flutter-v6-testing/SKILL.md +6 -6
  151. package/skills/cometchat-flutter-v6-theming/SKILL.md +38 -5
  152. package/skills/cometchat-flutter-v6-troubleshooting/SKILL.md +182 -17
  153. package/skills/cometchat-flutter-v6-users-groups/SKILL.md +12 -4
  154. package/skills/cometchat-i18n/SKILL.md +139 -78
  155. package/skills/cometchat-ios/SKILL.md +4 -2
  156. package/skills/cometchat-ios-calls/SKILL.md +225 -95
  157. package/skills/cometchat-ios-calls/references/add-calls-to-existing-chat.md +11 -9
  158. package/skills/cometchat-ios-calls/references/audio-modes-and-controls.md +45 -0
  159. package/skills/cometchat-ios-calls/references/avaudiosession-routing.md +6 -7
  160. package/skills/cometchat-ios-calls/references/call-layouts.md +31 -91
  161. package/skills/cometchat-ios-calls/references/call-session.md +51 -54
  162. package/skills/cometchat-ios-calls/references/callkit-and-pushkit.md +33 -29
  163. package/skills/cometchat-ios-calls/references/custom-ui.md +38 -38
  164. package/skills/cometchat-ios-calls/references/group-calls.md +33 -70
  165. package/skills/cometchat-ios-calls/references/idle-timeout.md +24 -25
  166. package/skills/cometchat-ios-calls/references/in-call-chat.md +19 -23
  167. package/skills/cometchat-ios-calls/references/migration-v4-to-v5.md +128 -70
  168. package/skills/cometchat-ios-calls/references/picture-in-picture.md +20 -20
  169. package/skills/cometchat-ios-calls/references/raise-hand.md +14 -227
  170. package/skills/cometchat-ios-calls/references/recording-screen-share.md +35 -122
  171. package/skills/cometchat-ios-calls/references/ringing-integration.md +17 -16
  172. package/skills/cometchat-ios-calls/references/share-invite.md +8 -12
  173. package/skills/cometchat-ios-calls/references/swiftui-uikit-hosting.md +4 -4
  174. package/skills/cometchat-ios-components/SKILL.md +200 -12
  175. package/skills/cometchat-ios-core/SKILL.md +281 -11
  176. package/skills/cometchat-ios-customization/SKILL.md +276 -110
  177. package/skills/cometchat-ios-features/SKILL.md +64 -36
  178. package/skills/cometchat-ios-placement/SKILL.md +15 -12
  179. package/skills/cometchat-ios-production/SKILL.md +12 -4
  180. package/skills/cometchat-ios-push/SKILL.md +53 -19
  181. package/skills/cometchat-ios-testing/SKILL.md +14 -9
  182. package/skills/cometchat-ios-theming/SKILL.md +39 -3
  183. package/skills/cometchat-ios-troubleshooting/SKILL.md +41 -21
  184. package/skills/cometchat-native-bare-patterns/SKILL.md +56 -18
  185. package/skills/cometchat-native-calls/SKILL.md +89 -19
  186. package/skills/cometchat-native-calls/references/add-calls-to-existing-chat.md +2 -2
  187. package/skills/cometchat-native-calls/references/call-layouts.md +15 -14
  188. package/skills/cometchat-native-calls/references/call-session.md +2 -2
  189. package/skills/cometchat-native-calls/references/custom-ui.md +12 -8
  190. package/skills/cometchat-native-calls/references/device-management.md +53 -30
  191. package/skills/cometchat-native-calls/references/group-calls.md +35 -30
  192. package/skills/cometchat-native-calls/references/idle-timeout.md +6 -6
  193. package/skills/cometchat-native-calls/references/in-call-chat.md +10 -8
  194. package/skills/cometchat-native-calls/references/migration-v4-to-v5.md +2 -2
  195. package/skills/cometchat-native-calls/references/raise-hand.md +15 -13
  196. package/skills/cometchat-native-calls/references/recording-screen-share.md +49 -170
  197. package/skills/cometchat-native-calls/references/share-invite.md +7 -5
  198. package/skills/cometchat-native-calls/references/voip-push-end-to-end.md +4 -2
  199. package/skills/cometchat-native-components/SKILL.md +91 -57
  200. package/skills/cometchat-native-core/SKILL.md +281 -9
  201. package/skills/cometchat-native-customization/SKILL.md +150 -28
  202. package/skills/cometchat-native-expo-patterns/SKILL.md +77 -27
  203. package/skills/cometchat-native-features/SKILL.md +79 -49
  204. package/skills/cometchat-native-placement/SKILL.md +19 -10
  205. package/skills/cometchat-native-production/SKILL.md +9 -3
  206. package/skills/cometchat-native-push/SKILL.md +2 -1
  207. package/skills/cometchat-native-testing/SKILL.md +1 -2
  208. package/skills/cometchat-native-theming/SKILL.md +54 -29
  209. package/skills/cometchat-native-troubleshooting/SKILL.md +71 -3
  210. package/skills/cometchat-nextjs-patterns/SKILL.md +48 -6
  211. package/skills/cometchat-placement/SKILL.md +42 -3
  212. package/skills/cometchat-production/SKILL.md +12 -5
  213. package/skills/cometchat-react-calls/SKILL.md +220 -10
  214. package/skills/cometchat-react-calls/references/add-calls-to-existing-chat.md +4 -3
  215. package/skills/cometchat-react-calls/references/call-layouts.md +5 -6
  216. package/skills/cometchat-react-calls/references/call-session.md +1 -1
  217. package/skills/cometchat-react-calls/references/custom-ui.md +61 -15
  218. package/skills/cometchat-react-calls/references/device-management.md +55 -51
  219. package/skills/cometchat-react-calls/references/group-calls.md +18 -23
  220. package/skills/cometchat-react-calls/references/idle-timeout.md +25 -12
  221. package/skills/cometchat-react-calls/references/in-call-chat.md +7 -7
  222. package/skills/cometchat-react-calls/references/migration-v4-to-v5.md +9 -11
  223. package/skills/cometchat-react-calls/references/raise-hand.md +14 -14
  224. package/skills/cometchat-react-calls/references/recording-screen-share.md +39 -38
  225. package/skills/cometchat-react-calls/references/ringing-integration.md +2 -2
  226. package/skills/cometchat-react-calls/references/share-invite.md +4 -5
  227. package/skills/cometchat-react-calls/references/testing-calls-on-web.md +20 -2
  228. package/skills/cometchat-react-calls/references/virtual-background.md +32 -0
  229. package/skills/cometchat-react-patterns/SKILL.md +57 -4
  230. package/skills/cometchat-react-push/SKILL.md +258 -72
  231. package/skills/cometchat-react-router-patterns/SKILL.md +43 -4
  232. package/skills/cometchat-react-testing/SKILL.md +14 -5
  233. package/skills/cometchat-theming/SKILL.md +181 -18
  234. package/skills/cometchat-troubleshooting/SKILL.md +40 -20
@@ -3,13 +3,14 @@ name: cometchat-ios-troubleshooting
3
3
  description: "Diagnose and fix common CometChat iOS integration issues — build errors, runtime errors, and debugging techniques."
4
4
  license: "MIT"
5
5
  compatibility: "CometChatUIKitSwift ^5; iOS 13+"
6
- allowed-tools: "shell, file-read, file-search, file-list"
7
6
  metadata:
8
7
  author: "CometChat"
9
8
  version: "3.0.0"
10
9
  tags: "chat cometchat ios troubleshooting debugging errors fixes"
11
10
  ---
12
11
 
12
+ > **Ground truth:** `CometChatUIKitSwift ~> 5` (+ `CometChatCallsSDK ~> 5`) — Pods/SPM `.swiftinterface` + `ui-kit/ios`. **Official docs:** https://www.cometchat.com/docs/ui-kit/ios/overview · **Docs MCP:** `claude mcp add --transport http cometchat-docs https://www.cometchat.com/docs/mcp` (or fetch the URL directly without MCP). Verify symbols against the installed package/source before relying on them.
13
+
13
14
  ## Purpose
14
15
 
15
16
  This skill helps diagnose and fix common issues when integrating CometChat iOS UI Kit. It covers build errors, runtime errors, and debugging techniques.
@@ -76,7 +77,7 @@ pod 'CometChatSDK', '~> 4.0' # Add explicitly if needed
76
77
  1. **If you need calls:**
77
78
  ```ruby
78
79
  # Podfile
79
- pod 'CometChatCallsSDK', '~> 4.0'
80
+ pod 'CometChatCallsSDK', '~> 5.0'
80
81
  ```
81
82
 
82
83
  2. **If you don't need calls:**
@@ -116,6 +117,7 @@ case .onError(let error):
116
117
  **Solution:** `CometChatException` does NOT conform to Swift's `Error` protocol. Don't use `Result<T, Error>` with CometChat callbacks. Instead, use direct callbacks:
117
118
 
118
119
  ```swift
120
+ // tier2-expect-error — this block intentionally demonstrates the compile error below
119
121
  // ❌ WRONG - Don't use Result<T, Error>
120
122
  func login(completion: @escaping (Result<User, Error>) -> Void) {
121
123
  CometChatUIKit.login(uid: uid) { result in
@@ -182,7 +184,7 @@ See `cometchat-ios-components` § 13 ("Custom MessagesVC Implementation") for th
182
184
  1. **Install the Calls SDK:**
183
185
  ```ruby
184
186
  # Podfile
185
- pod 'CometChatCallsSDK', '~> 4.0'
187
+ pod 'CometChatCallsSDK', '~> 5.0'
186
188
  ```
187
189
 
188
190
  2. **Or wrap in conditional compilation:**
@@ -413,12 +415,12 @@ if let user = CometChatUIKit.getLoggedInUser() {
413
415
  3. **Check for errors:**
414
416
  ```swift
415
417
  let conversations = CometChatConversations()
416
- conversations.onError = { error in
418
+ conversations.set(onError: { error in
417
419
  print("Error loading conversations: \(error.errorDescription ?? "")")
418
- }
419
- conversations.onEmpty = {
420
+ })
421
+ conversations.set(onEmpty: {
420
422
  print("No conversations found")
421
- }
423
+ })
422
424
  ```
423
425
 
424
426
  ---
@@ -437,9 +439,9 @@ composer.set(user: user) // Must be set!
437
439
 
438
440
  2. **Check for errors:**
439
441
  ```swift
440
- composer.onError = { error in
441
- print("Composer error: \(error.errorDescription ?? "")")
442
- }
442
+ composer.set(onError: { error in
443
+ print("Composer error: \((error as? CometChatException)?.errorDescription ?? "")")
444
+ })
443
445
  ```
444
446
 
445
447
  3. **Verify network connection:**
@@ -503,7 +505,7 @@ func application(_ application: UIApplication, didRegisterForRemoteNotifications
503
505
 
504
506
  1. **CometChatCallsSDK installed?**
505
507
  ```ruby
506
- pod 'CometChatCallsSDK', '~> 4.0'
508
+ pod 'CometChatCallsSDK', '~> 5.0'
507
509
  ```
508
510
 
509
511
  2. **Permissions in Info.plist?**
@@ -520,6 +522,16 @@ pod 'CometChatCallsSDK', '~> 4.0'
520
522
 
521
523
  4. **Testing on real device?** Calls don't work on simulator
522
524
 
525
+ 5. **Did you call `CometChatCalls.login(...)`?** ⚠️ **On iOS there is NO `CometChatCalls.login`** — the iOS `CometChatCallsSDK` has no `login`/`joinSession`/`SessionSettingsBuilder`. The authority is the vendored `CometChatCallsSDK.swiftinterface` (`generateToken` / `startSession` / `CallSettingsBuilder` / `CallsEventsDelegate`). The `calls-sdk-ios` repo's own `skills/` describe a *different* API and will mislead you — don't follow them. Default calling works through the UI Kit (`CometChatUIKit` calling-enabled) without a separate calls login; for custom calling, use `generateToken` → `startSession`.
526
+
527
+ ### Background push for calls not arriving (Privacy manifest / APNs vs FCM)
528
+
529
+ **Cause:** Missing privacy manifest, or an APNs-vs-FCM provider mismatch.
530
+
531
+ **Fix:**
532
+ - Add a **`PrivacyInfo.xcprivacy`** privacy manifest to the app target (required by App Store review; its absence can also break some push/SDK behaviors).
533
+ - Match the **provider** to your token type: if you registered an **APNs** device/VoIP token, the dashboard provider must be **APNs** (`.p8` + Team ID + Key ID, dev-vs-prod environment matching the build); if you route iOS through **FCM**, register with the FCM provider and the `FCM_IOS` platform. A token registered against the wrong provider silently never delivers. See `cometchat-ios-push`.
534
+
523
535
  ---
524
536
 
525
537
  ### Memory Warnings / Crashes
@@ -530,9 +542,9 @@ pod 'CometChatCallsSDK', '~> 4.0'
530
542
 
531
543
  1. **Use weak references in closures:**
532
544
  ```swift
533
- conversations.onItemClick = { [weak self] conversation, _ in
545
+ conversations.set(onItemClick: { [weak self] conversation, _ in
534
546
  self?.openMessages(for: conversation)
535
- }
547
+ })
536
548
  ```
537
549
 
538
550
  2. **Remove listeners when done:**
@@ -573,11 +585,19 @@ CometChatUIKit.login(uid: "user-123") { result in
573
585
 
574
586
  ## 3. Debugging Techniques
575
587
 
576
- ### Enable CometChat Logging
588
+ ### Inspect SDK errors
589
+
590
+ The CometChat iOS SDK has **no public log-level API** (there is no
591
+ `CometChat.setLogLevel` / `AppSettingsBuilder` logging toggle). Diagnose by
592
+ reading the `CometChatException` handed to each call's `onError` closure:
577
593
 
578
594
  ```swift
579
- // Add before initialization
580
- CometChat.setLogLevel(.debug)
595
+ CometChat.init(appId: appID, appSettings: settings, onSuccess: { _ in
596
+ print("CometChat init OK")
597
+ }, onError: { error in
598
+ // CometChatException → code + message (init's onError is non-optional)
599
+ print("init failed:", error.errorCode, error.errorDescription)
600
+ })
581
601
  ```
582
602
 
583
603
  ### Check Connection Status
@@ -640,7 +660,7 @@ Use Charles Proxy or Proxyman to inspect CometChat API calls:
640
660
  ```swift
641
661
  // Print current state
642
662
  print("User: \(CometChatUIKit.getLoggedInUser()?.uid ?? "none")")
643
- print("Initialized: \(CometChatManager.shared.isInitialized)")
663
+ print("Logged in: \(CometChatUIKit.getLoggedInUser() != nil)")
644
664
  ```
645
665
 
646
666
  ---
@@ -670,7 +690,7 @@ print("Initialized: \(CometChatManager.shared.isInitialized)")
670
690
  1. **Limit initial fetch:**
671
691
  ```swift
672
692
  let conversations = CometChatConversations()
673
- conversations.set(conversationsRequestBuilder: ConversationsRequest.ConversationsRequestBuilder()
693
+ conversations.set(conversationsRequestBuilder: ConversationRequest.ConversationRequestBuilder()
674
694
  .set(limit: 20) // Reduce initial load
675
695
  )
676
696
  ```
@@ -740,9 +760,9 @@ struct ConversationsWrapper: UIViewControllerRepresentable {
740
760
 
741
761
  func makeUIViewController(context: Context) -> CometChatConversations {
742
762
  let vc = CometChatConversations()
743
- vc.onItemClick = { conversation, _ in
763
+ vc.set(onItemClick: { conversation, _ in
744
764
  selectedConversation = conversation
745
- }
765
+ })
746
766
  return vc
747
767
  }
748
768
 
@@ -790,7 +810,7 @@ When something isn't working:
790
810
  7. [ ] **Check permissions:** Camera, microphone, notifications
791
811
  8. [ ] **Check main thread:** UI updates on main thread
792
812
  9. [ ] **Check completion handlers:** Wait for async operations
793
- 10. [ ] **Enable logging:** `CometChat.setLogLevel(.debug)`
813
+ 10. [ ] **Inspect errors:** read the `CometChatException` in each call's `onError` (`errorCode` + `errorDescription`) — the SDK has no log-level toggle
794
814
 
795
815
  ---
796
816
 
@@ -3,7 +3,6 @@ name: cometchat-native-bare-patterns
3
3
  description: "Integration patterns for bare React Native CLI projects — pod install, Info.plist + AndroidManifest permissions, Apple privacy manifest, native module linking, Metro config."
4
4
  license: "MIT"
5
5
  compatibility: "Node.js >=18; React Native >=0.77; @cometchat/chat-uikit-react-native ^5"
6
- allowed-tools: "shell, file-read, file-search, file-list, ask-user"
7
6
  metadata:
8
7
  author: "CometChat"
9
8
  version: "3.0.0"
@@ -24,7 +23,7 @@ Teaches Claude how to integrate CometChat into a bare React Native CLI project.
24
23
 
25
24
  **Read `cometchat-native-core` first** (init/login/wrapper chain + anti-patterns), then `cometchat-native-components`, then `cometchat-native-placement`.
26
25
 
27
- Ground truth: `docs/ui-kit/react-native/react-native-cli-integration.mdx`, `apple-privacy-manifest-guide.mdx`, `react-native-conversation.mdx` + `react-native-one-to-one-chat.mdx` + `react-native-tab-based-chat.mdx`, and `examples/SampleApp/`.
26
+ Ground truth: `docs/ui-kit/react-native/react-native-cli-integration.mdx`, `apple-privacy-manifest-guide.mdx`, `react-native-conversation.mdx` + `react-native-one-to-one-chat.mdx` + `react-native-tab-based-chat.mdx`, and `examples/SampleApp/`. **Official docs:** https://www.cometchat.com/docs/ui-kit/react-native/overview · **Docs MCP:** `claude mcp add --transport http cometchat-docs https://www.cometchat.com/docs/mcp` (or fetch the URL directly without MCP).
28
27
 
29
28
  ---
30
29
 
@@ -58,7 +57,8 @@ Ground truth: `docs/ui-kit/react-native/react-native-cli-integration.mdx`, `appl
58
57
  npm install @cometchat/chat-sdk-react-native
59
58
  npm install @cometchat/chat-uikit-react-native
60
59
 
61
- # Required peer deps (natively linked)
60
+ # Natively-linked deps used by the kit + sample apps. (datetimepicker isn't a
61
+ # declared kit peer, but every shipped sample installs it — keep it for parity.)
62
62
  npm install \
63
63
  @react-native-async-storage/async-storage \
64
64
  @react-native-clipboard/clipboard \
@@ -75,6 +75,17 @@ npm install dayjs punycode
75
75
 
76
76
  Bare RN uses autolinking, so no `react-native link` step is needed. Just confirm everything installed cleanly — if `npm install` errored mid-way, native modules won't be wired up correctly.
77
77
 
78
+ > ⚠️ **RN 0.85+ build trap — `react-native-document-picker` v9.x breaks the Android build (ENG-35701).** The unmaintained `react-native-document-picker@9.3.1` references `GuardedResultAsyncTask`, which React Native removed in 0.85.0. If the kit pulls it in transitively (or you add it for file uploads), `:react-native-document-picker:compileDebugJavaWithJavac` fails with `cannot find symbol class GuardedResultAsyncTask`. **Swap to `@react-native-documents/document-picker` (bare RN) or `expo-document-picker` (Expo):**
79
+ >
80
+ > ```bash
81
+ > # Bare RN (the maintained fork)
82
+ > npm uninstall react-native-document-picker
83
+ > npm install @react-native-documents/document-picker
84
+ > cd ios && pod install && cd ..
85
+ > ```
86
+ >
87
+ > Then in code, `import { pick } from '@react-native-documents/document-picker'` instead of the default export. The API surface is similar — `pick({ type: ['*/*'] })` returns a `Promise<DocumentPickerResult[]>`. See `cometchat-native-troubleshooting` §3bb for the full migration matrix.
88
+
78
89
  ### Optional — calling SDK
79
90
 
80
91
  Only if the user's flow includes voice / video calls:
@@ -85,9 +96,14 @@ npm install \
85
96
  @react-native-community/netinfo \
86
97
  react-native-background-timer \
87
98
  react-native-callstats \
88
- react-native-webrtc
99
+ react-native-webrtc \
100
+ react-native-url-polyfill \
101
+ react-native-performance \
102
+ valibot
89
103
  ```
90
104
 
105
+ > **`react-native-url-polyfill`, `react-native-performance`, and `valibot` are not in the calls-sdk `peerDependencies` array** — but the calls-sdk's `dist/polyfills/browser.js` imports them at module top, so Metro fails the bundle without them. Omitting any of the three yields `Unable to resolve module …` at startup with no app render. (Validated 2026-05-26 on `@cometchat/calls-sdk-react-native@5.0.0`.)
106
+
91
107
  WebRTC bloats the binary. Skip until the user actually wants calls.
92
108
 
93
109
  ---
@@ -231,9 +247,9 @@ Open `android/app/src/main/AndroidManifest.xml` and add inside `<manifest>` (bef
231
247
 
232
248
  **Merge, don't replace.** Keep the user's existing permissions for other libraries.
233
249
 
234
- ### 3b. Android: async-storage Maven repo (REQUIRED)
250
+ ### 3b. Android: async-storage Maven repo (ONLY if you use async-storage v3+)
235
251
 
236
- `@react-native-async-storage/async-storage` v3+ ships a **local Maven artifact** that autolinking can't find by default. Without this fix, `./gradlew assembleDebug` fails with:
252
+ ⚠️ **Conditional — not part of the default build.** The kit does NOT pin async-storage, and the shipped sample apps use `@react-native-async-storage/async-storage@^2.2.0` (which needs none of this). This step applies **only if you opt into async-storage v3+**, whose **local Maven artifact** autolinking can't find by default then `./gradlew assembleDebug` fails with:
237
253
 
238
254
  ```
239
255
  Could not find :react-native-async-storage_async-storage: on any of the paths.
@@ -254,7 +270,9 @@ allprojects {
254
270
  }
255
271
  ```
256
272
 
257
- Without this fix, the whole Android build fails early. This is a UI Kit-specific gotcha because the kit pins async-storage v3+.
273
+ Without this fix, an async-storage-v3+ Android build fails early. (On the default async-storage v2.2.0 what the samples ship this isn't needed.)
274
+
275
+ > **Known issue (F78) — chat-sdk 4.0.22 breaks bare RN at runtime.** Separate from the build-time Maven error above: `@cometchat/chat-sdk-react-native@4.0.22` declares `react-native@0.64.2` + async-storage as **hard deps** (4.0.21 had none), so npm installs a nested duplicate react-native inside the SDK. The app builds fine but crashes at JS startup with `Cannot read property 'CometChatThemeProvider' of undefined` (AsyncStorage native module mismatch). **Expo is unaffected.** Fix: add npm `overrides` to dedupe, or pin `@cometchat/chat-sdk-react-native@4.0.21`. Full root cause + exact `overrides` block in `cometchat-native-troubleshooting` §3bc. Tracked in ENG-35653.
258
276
 
259
277
  ### 3c. Android: Metro config for custom fonts or assets (if applicable)
260
278
 
@@ -292,8 +310,8 @@ AppRegistry.registerComponent(appName, () => App);
292
310
  // App.tsx
293
311
  import React from "react";
294
312
  import { GestureHandlerRootView } from "react-native-gesture-handler";
295
- import { SafeAreaProvider } from "react-native-safe-area-context";
296
- import { CometChatThemeProvider } from "@cometchat/chat-uikit-react-native";
313
+ import { SafeAreaProvider, SafeAreaView } from "react-native-safe-area-context";
314
+ import { CometChatThemeProvider, CometChatI18nProvider } from "@cometchat/chat-uikit-react-native";
297
315
  import { CometChatProvider } from "./src/providers/CometChatProvider";
298
316
  import { AppNavigator } from "./src/navigation/AppNavigator";
299
317
  import Config from "react-native-config"; // or read from an env source
@@ -303,14 +321,18 @@ export default function App() {
303
321
  <GestureHandlerRootView style={{ flex: 1 }}>
304
322
  <SafeAreaProvider>
305
323
  <CometChatThemeProvider>
306
- <CometChatProvider
307
- appId={Config.COMETCHAT_APP_ID!}
308
- region={Config.COMETCHAT_REGION!}
309
- authKey={Config.COMETCHAT_AUTH_KEY!}
310
- uid="cometchat-uid-1" // dev mode only
311
- >
312
- <AppNavigator />
313
- </CometChatProvider>
324
+ <CometChatI18nProvider>
325
+ <CometChatProvider
326
+ appId={Config.COMETCHAT_APP_ID!}
327
+ region={Config.COMETCHAT_REGION!}
328
+ authKey={Config.COMETCHAT_AUTH_KEY!}
329
+ uid="cometchat-uid-1" // dev mode only
330
+ >
331
+ <SafeAreaView edges={["top", "bottom"]} style={{ flex: 1 }}>
332
+ <AppNavigator />
333
+ </SafeAreaView>
334
+ </CometChatProvider>
335
+ </CometChatI18nProvider>
314
336
  </CometChatThemeProvider>
315
337
  </SafeAreaProvider>
316
338
  </GestureHandlerRootView>
@@ -318,7 +340,7 @@ export default function App() {
318
340
  }
319
341
  ```
320
342
 
321
- The `CometChatProvider` itself lives in `src/providers/CometChatProvider.tsx` per `cometchat-native-core` § 6 — reuse that implementation.
343
+ The provider chain matches the kit sample app (`examples/SampleApp/App.tsx`): `CometChatI18nProvider` sits inside `CometChatThemeProvider`, and a root `SafeAreaView edges={["top", "bottom"]}` wraps the navigator. The `CometChatProvider` itself lives in `src/providers/CometChatProvider.tsx` per `cometchat-native-core` § 6 — reuse that implementation.
322
344
 
323
345
  ---
324
346
 
@@ -510,3 +532,19 @@ Use Expo + `npx expo prebuild` to generate native projects on demand. Stay on `c
510
532
  | `cometchat-native-customization` | Text formatters, events, custom views |
511
533
  | `cometchat-native-production` | Server-side auth tokens + user management |
512
534
  | `cometchat-native-troubleshooting` | pod install fails, build errors, missing modules, privacy manifest rejection |
535
+
536
+ ## Visual Builder integration (v4.3)
537
+
538
+ If the customer picks **Visually** in dispatcher Step 3.1, the bare RN recipe diverges from the standard provider chain. Skills runs `cometchat builder export --platform react-native --json` to emit `src/config/{store.ts, config.json}` (the Zustand-backed config store + 7-field envelope JSON), then patches `App.tsx` with `useConfig` + theme derivation.
539
+
540
+ **Full recipe lives in `cometchat-native-core` §"Visual Builder integration".** Bare RN-specific notes:
541
+
542
+ - No `npx expo install` — install deps via `npm install` and pin manually. The 11 explicit peer-dep list applies in full (see §"Mandatory peer deps").
543
+ - Env via `react-native-dotenv` Babel plugin — the standard bare-RN convention. Add `[['module:react-native-dotenv']]` to `babel.config.js` plugins. Import via `import { COMETCHAT_APP_ID, COMETCHAT_REGION, COMETCHAT_AUTH_KEY } from "@env"`. Add a `src/env.d.ts` type declaration so TS recognizes the `@env` module.
544
+ - Required additional deps: `zustand`, `@react-native-async-storage/async-storage`, plus the standard 11 peers from §"Mandatory peer deps".
545
+ - `useConfig(s => s.settings.style)` — note the selector takes `AppConfig` directly, NOT `s.config.settings.style` (Finding F6, 2026-05-21).
546
+ - Envelope is `settings: { chatFeatures, callFeatures, layout, style, noCode }` — theme tokens live under `settings.style` (there's no `settings.theme`/`settings.agent`); the engagement feature group is `chatFeatures.deeperUserEngagement` (not `deeperEngagement`). See core §"Feature flag access".
547
+ - The reference builder app wires gesture-handler as a top-of-file side-effect import (`import './gesture-handler';`), not a `<GestureHandlerRootView>` wrapper; its provider chain is `SafeAreaProvider → SafeAreaView → CometChatThemeProvider → CometChatI18nProvider`. The general bare provider chain above (with `GestureHandlerRootView`) is also valid — see core §"Visual Builder integration" for the reference-matched template.
548
+ - iOS host: run `cd ios && pod install` after the deps land. B6 smoke validated: Metro bundles 4.6 MB iOS bundle clean on RN 0.81.5 + React 19.1.0.
549
+
550
+ If the customer picks **In code**, ignore this section — the standard four-wrapper chain + provider pattern applies.
@@ -3,7 +3,6 @@ name: cometchat-native-calls
3
3
  description: CometChat Calls SDK integration for React Native (Expo managed + bare CLI). Covers @cometchat/calls-sdk-react-native install, dual-SDK init, native module linking (iOS pods, Android Gradle), VoIP push via react-native-callkeep + react-native-voip-push-notification + @react-native-firebase/messaging, CallKit on iOS / ConnectionService on Android, foreground service correctness on Android 14+, gesture handler + reanimated peer deps, Expo-specific config plugins, and additive-vs-standalone modes.
4
4
  license: "MIT"
5
5
  compatibility: "React Native >= 0.70 (>= 0.72 recommended), Expo SDK >= 49 (managed) / bare RN CLI; @cometchat/calls-sdk-react-native ^4.x; @cometchat/chat-sdk-react-native ^4.x; @cometchat/chat-uikit-react-native ^5.x (additive mode)"
6
- allowed-tools: "shell, file-read, file-search, file-list, ask-user"
7
6
  metadata:
8
7
  author: "CometChat"
9
8
  version: "4.0.0"
@@ -23,17 +22,19 @@ Production-grade voice + video calling for React Native (Expo managed + bare CLI
23
22
  - Framework path: `cometchat-native-expo-patterns` (managed) OR `cometchat-native-bare-patterns` (CLI)
24
23
 
25
24
  **Ground truth:**
26
- - SDK source — `~/Downloads/calls-sdk/calls-sdk-react-native-5/package/`
27
- - Sample app — `~/Downloads/calls-sdk/calls-sdk-react-native-5/sample-apps/cometchat-calls-sample-app-react-native/`
25
+ - SDK source — `calls-sdk-react-native-5/package/`
26
+ - Sample app — `calls-sdk-react-native-5/sample-apps/cometchat-calls-sample-app-react-native/`
28
27
  - Public docs — https://www.cometchat.com/docs/calls/react-native/overview
29
28
 
30
29
  ---
31
30
 
32
31
  ## 1. Hard rules — RN specialization
33
32
 
34
- ### 1.0 Calls SDK login is its own step (v5+)
33
+ ### 1.0 Calls SDK login only the STANDALONE/raw-SDK path needs it
35
34
 
36
- The v5 Calls SDK has its own auth state, separate from the Chat SDK. After `CometChat.login(uid, AUTH_KEY)` succeeds, you MUST also call `await CometChatCalls.login(uid, AUTH_KEY)` without it, the FIRST calls API call (`initiateCall`, `joinSession`, `generateToken`) throws **"auth token cannot be null"**. The chat skill's "login once, persist forever" pattern does NOT transfer.
35
+ > ✅ **The additive UI-Kit path does NOT call `CometChatCalls.login`.** When calls are layered onto the RN UI Kit (the common case `<CometChatIncomingCall>` at root + the auto call buttons in `CometChatMessageHeader`, calling extension enabled at `CometChatUIKit.init`), the kit chains the Calls-SDK auth off `CometChatUIKit.login` for you. **The canonical RN SampleApp wires calls end-to-end (incoming/outgoing/ongoing) with ZERO `CometChatCalls.login`** (verified across `examples/SampleApp` + `SampleAppWithPushNotifications`; the kit's `CometChatUIKit.login` only runs `CometChat.login`). Don't add it on the UI-Kit path — it's redundant.
36
+
37
+ **`await CometChatCalls.login(uid, AUTH_KEY)` is required ONLY on the STANDALONE / raw-Calls-SDK path** (§4a/§4b — no UI Kit; you call `CometChatCalls.generateToken` / render a custom call surface directly). There the Calls SDK has its own auth state: after `CometChat.login(uid, AUTH_KEY)` succeeds, also call `await CometChatCalls.login(uid, AUTH_KEY)` — without it the first raw calls API throws **"auth token cannot be null"**. (No imperative `joinSession` on RN — see rule below.)
37
38
 
38
39
  ```ts
39
40
  import { CometChat } from "@cometchat/chat-sdk-react-native";
@@ -133,9 +134,76 @@ Required:
133
134
  - Android — runtime requests via `PermissionsAndroid.requestMultiple` for `RECORD_AUDIO`, `CAMERA`, `POST_NOTIFICATIONS` (Android 13+)
134
135
  - Expo managed — declare in `app.json` `expo.ios.infoPlist` and `expo.android.permissions`; the prebuild merges into native manifests
135
136
 
136
- ### 1.7 IncomingCall mounted at app root
137
+ ### 1.7 IncomingCall + OutgoingCall + OngoingCall — full event-listener wiring
138
+
139
+ `<CometChatIncomingCall />`, `<CometChatOutgoingCall />`, and `<CometChatOngoingCall />` are **NOT auto-mounted by each other**. The parent component must register both `CometChat.addCallListener` (SDK socket) and `CometChatUIEventHandler.addCallListener` (UI events fired by `<CometChatCallButtons>` / `<CometChatMessageHeader>`), then conditionally render whichever overlay matches current state. Validated 2026-05-26 on Pixel 3 + `@cometchat/chat-uikit-react-native@5.3.5`.
140
+
141
+ Mount this wiring inside the root navigator OR in the App.tsx wrapper, ABOVE all stacks/tabs — calls only ring on screens where the listener exists.
142
+
143
+ ```tsx
144
+ import { CometChat } from "@cometchat/chat-sdk-react-native";
145
+ import { CometChatCalls } from "@cometchat/calls-sdk-react-native";
146
+ import {
147
+ CometChatIncomingCall,
148
+ CometChatOutgoingCall,
149
+ CometChatOngoingCall,
150
+ CometChatUIEventHandler,
151
+ } from "@cometchat/chat-uikit-react-native";
152
+ import { StyleSheet, View } from "react-native";
153
+
154
+ const CALL_LISTENER_ID = "app-call-listener";
155
+
156
+ function CallSurfaces() {
157
+ const [outgoingCall, setOutgoingCall] = useState<CometChat.Call | null>(null);
158
+ const [incomingCall, setIncomingCall] = useState<CometChat.Call | null>(null);
159
+ const [ongoingCall, setOngoingCall] = useState<CometChat.Call | null>(null);
160
+
161
+ useEffect(() => {
162
+ // SDK socket — incoming + outgoing-rejected
163
+ CometChat.addCallListener(
164
+ CALL_LISTENER_ID,
165
+ new CometChat.CallListener({
166
+ onIncomingCallReceived: (call: CometChat.Call) => setIncomingCall(call),
167
+ onIncomingCallCancelled: () => setIncomingCall(null),
168
+ onOutgoingCallAccepted: () => {},
169
+ onOutgoingCallRejected: () => setOutgoingCall(null),
170
+ })
171
+ );
172
+ // UI events fired by the kit's CallButtons / MessageHeader on tap
173
+ CometChatUIEventHandler.addCallListener(CALL_LISTENER_ID, {
174
+ ccOutgoingCall: ({ call }) => setOutgoingCall(call),
175
+ ccCallEnded: () => {
176
+ setOutgoingCall(null);
177
+ setIncomingCall(null);
178
+ setOngoingCall(null);
179
+ },
180
+ ccShowOngoingCall: ({ call }) => setOngoingCall(call),
181
+ });
182
+ // Mid-call drops (peer left, network loss, server close) do NOT come through the
183
+ // Chat-SDK/UI-Kit channels above — they fire on the Calls SDK session events (v5).
184
+ // For a STANDALONE custom call surface, also register (clone skills/event-listeners):
185
+ // const offLeft = CometChatCalls.addEventListener('onSessionLeft', () => { /* reset state */ });
186
+ // const offClosed = CometChatCalls.addEventListener('onConnectionClosed', () => { /* reset state */ });
187
+ // // addEventListener returns an unsubscribe fn — call offLeft()/offClosed() on cleanup.
188
+ // (Additive mode using the kit's <CometChatOngoingCall> handles this internally.)
189
+ return () => {
190
+ CometChat.removeCallListener(CALL_LISTENER_ID);
191
+ CometChatUIEventHandler.removeCallListener(CALL_LISTENER_ID);
192
+ };
193
+ }, []);
194
+
195
+ return (
196
+ <>
197
+ {incomingCall && <View style={StyleSheet.absoluteFill}><CometChatIncomingCall call={incomingCall} onDecline={() => setIncomingCall(null)} /></View>}{/* onDecline is REQUIRED on the RN kit's CometChatIncomingCall (onAccept/onError optional) */}
198
+ {outgoingCall && <View style={StyleSheet.absoluteFill}><CometChatOutgoingCall call={outgoingCall} /></View>}
199
+ {/* CometChatOngoingCall has NO `call` prop — it takes sessionID (required) + callSettingsBuilder (required) + onError? (verified vs uikit-react-native-v5 CometChatOngoingCall.tsx). CometChatIncomingCall/OutgoingCall DO take `call`. */}
200
+ {ongoingCall && <View style={StyleSheet.absoluteFill}><CometChatOngoingCall sessionID={ongoingCall.getSessionId()} callSettingsBuilder={new CometChatCalls.CallSettingsBuilder().setIsAudioOnlyCall(ongoingCall.getType() === "audio")} /></View>}
201
+ </>
202
+ );
203
+ }
204
+ ```
137
205
 
138
- `<CometChatIncomingCall />` (additive mode) goes inside the root navigator OR in the App.tsx wrapper, ABOVE all stacks/tabs. Same rule as webcalls only ring on screens where the listener exists.
206
+ > **Don't skip the `ccOutgoingCall` listener.** Without it, tapping the video/voice button in `<CometChatMessageHeader>` triggers the call at the SDK level (WebRTC, camera, audio init) but no overlay UI ever mounts the user sees nothing change after the tap. This was [[project_v4_3_f75_rn_call_ui_missing]] — F75.
139
207
 
140
208
  In standalone mode, CallKit/ConnectionService own the foreground UI; `<CometChatIncomingCall />` is not used. Instead, a `react-native-callkeep` event listener at app root reports new calls to the OS.
141
209
 
@@ -350,12 +418,12 @@ export async function initCometChat() {
350
418
 
351
419
  await CometChat.init(process.env.EXPO_PUBLIC_COMETCHAT_APP_ID!, appSettings);
352
420
 
353
- const callAppSettings = new CometChatCalls.CallAppSettingsBuilder()
354
- .setAppId(process.env.EXPO_PUBLIC_COMETCHAT_APP_ID!)
355
- .setRegion(process.env.EXPO_PUBLIC_COMETCHAT_REGION!)
356
- .build();
357
-
358
- CometChatCalls.init(callAppSettings);
421
+ // Calls SDK init takes a FLAT object — there is no CallAppSettingsBuilder in v5 RN.
422
+ await CometChatCalls.init({
423
+ appId: process.env.EXPO_PUBLIC_COMETCHAT_APP_ID!,
424
+ region: process.env.EXPO_PUBLIC_COMETCHAT_REGION!,
425
+ authKey: process.env.EXPO_PUBLIC_COMETCHAT_AUTH_KEY!,
426
+ });
359
427
 
360
428
  initialized = true;
361
429
  }
@@ -369,16 +437,16 @@ export async function initCometChat() {
369
437
 
370
438
  ### Calls SDK primitives
371
439
 
372
- Same names + shapes as the JavaScript SDK (Section 3 of `cometchat-react-calls`). The RN SDK adds platform-specific helpers `CometChatCalls.setUserVideoProxy` for native track piping etc. covered in deeper sample-app references.
440
+ Same names + shapes as the JavaScript SDK (Section 3 of `cometchat-react-calls`). RN-relevant session helpers include `switchCamera()`, `setAudioMode(mode)`, `muteAudio()`/`unmuteAudio()`, `pauseVideo()`/`resumeVideo()` see the SDK's custom-ui reference. (Web-only helpers like device enumeration and virtual background are not available on RN.)
373
441
 
374
442
  ### UI Kit views (additive mode — `@cometchat/chat-uikit-react-native`)
375
443
 
376
444
  | Component | Purpose |
377
445
  |---|---|
378
446
  | `<CometChatCallButtons user={u} group={g} />` | Voice + video icon row (typically inside `CometChatMessageHeader`). **Group + user semantics differ** — see callout below |
379
- | `<CometChatIncomingCall />` | Root-mounted listener |
380
- | `<CometChatOutgoingCall />` | Auto-mounted by IncomingCall on initiate |
381
- | `<CometChatOngoingCall />` | Active call view |
447
+ | `<CometChatIncomingCall />` | Root-mounted; renders ringing UI for incoming call (controlled by parent state — see §1.7) |
448
+ | `<CometChatOutgoingCall />` | Root-mounted; renders "Calling…" UI for outgoing call (controlled by parent state see §1.7) |
449
+ | `<CometChatOngoingCall />` | Root-mounted; renders active in-call view (controlled by parent state — see §1.7) |
382
450
  | `<CometChatCallLogs onItemClick={fn} />` | History |
383
451
 
384
452
  #### ⚠️ Group calls use message-based join, not the ringing channel (validated 2026-05-15)
@@ -418,7 +486,9 @@ When `product === "voice-video"` and there is no existing UI Kit.
418
486
 
419
487
  ### 4a. Standalone — Session mode (meeting-room UX, no ringing)
420
488
 
421
- Calls SDK ONLY. NO Chat SDK. Matches `~/Downloads/calls-sdk/calls-sdk-react-native-5/sample-apps/cometchat-calls-sample-app-react-native/`.
489
+ Calls SDK ONLY. NO Chat SDK. Matches `calls-sdk-react-native-5/sample-apps/cometchat-calls-sample-app-react-native/`.
490
+
491
+ > **⚠️ Idle timeout is in MILLISECONDS on React Native (the "instant exit on join" footgun).** Like the web SDK, the RN calls SDK's `SessionSettings` idle fields are **milliseconds, not seconds** (`calls-sdk-react-native/skills/session-settings`: `idleTimeoutPeriodBeforePrompt: 60000` ms). Setting `idleTimeoutPeriodBeforePrompt: 180` thinking "180s" means **180 ms** → the "Are you still there?" prompt fires and the session exits a fraction of a second after you join alone. Use ms: `{ idleTimeoutPeriodBeforePrompt: 180_000, idleTimeoutPeriodAfterPrompt: 60_000 }` (defaults 60_000 / 120_000). The timer only counts down when you're the **only** participant, so a solo test triggers it fastest. (Native Android/iOS/Flutter calls SDKs use **seconds** for `setIdleTimeoutPeriod`, default 300 — RN/web are the ms outliers.)
422
492
 
423
493
  **MANDATORY install set (MUST run BEFORE scaffolding files — bundle will fail with `Unable to resolve module <name>` for each one missing):**
424
494
 
@@ -575,7 +645,7 @@ When `cometchat-native-core` integration already exists. The skill:
575
645
  - [ ] CometChatUIKit.getLoggedInUser called with `.catch(() => null)` (rule 1.8.a)
576
646
  - [ ] Error rendering uses `e.message` not `String(e)` (rule 1.8.b)
577
647
  - [ ] Env-var guard: provider throws actionable error when appId/region undefined (rule 1.8.c "Also recommended")
578
- - [ ] Hangup path includes `endSession` + `RNCallKeep.endCall`
648
+ - [ ] Hangup path includes `leaveSession()` (v5-canonical; `endSession` is a deprecated shim) + `RNCallKeep.endCall`
579
649
  - [ ] Module-level `initialized` flag
580
650
 
581
651
  **Runtime (real devices, both platforms):**
@@ -94,7 +94,7 @@ await CometChat.init(APP_ID, settings);
94
94
  await CometChatCalls.init({ appId: APP_ID, region: REGION });
95
95
 
96
96
  // Later, after CometChat.login:
97
- await CometChatCalls.login(authToken);
97
+ await CometChatCalls.loginWithAuthToken(authToken);
98
98
  ```
99
99
 
100
100
  ---
@@ -185,7 +185,7 @@ Skipping any of these leaves zombies — call still showing in the OS as "active
185
185
  - [ ] Info.plist + AndroidManifest permissions in place
186
186
  - [ ] `foregroundServiceType` declared (Android 14+)
187
187
  - [ ] Calls init AFTER chat init
188
- - [ ] `CometChatCalls.login(authToken)` after chat login
188
+ - [ ] `CometChatCalls.loginWithAuthToken(authToken)` after chat login
189
189
  - [ ] CallKeep `setup` runs on app start (post-login)
190
190
  - [ ] VoIP token registration triggered on iOS
191
191
  - [ ] FCM token registration triggered on Android
@@ -12,23 +12,24 @@ Same SDK as web (TILE/SIDEBAR/SPOTLIGHT). RN-specific: layout switcher must be a
12
12
  ```ts
13
13
  import { CometChatCalls } from "@cometchat/calls-sdk-react-native";
14
14
 
15
- const callSettings = new CallSettingsBuilder()
16
- .setSessionType(CometChatCalls.constants.SESSION_TYPE.VIDEO)
17
- .setLayout(CometChatCalls.constants.LAYOUT.TILE)
18
- .build();
15
+ // Layout values are the bare string literals "TILE" | "SIDEBAR" | "SPOTLIGHT".
16
+ // There are NO top-level LAYOUT / SESSION_TYPE named exports — the SDK only exports
17
+ // CometChatCalls. (Constants that exist are namespaced statics:
18
+ // CometChatCalls.CALL_MODE.* and CometChatCalls.AUDIO_MODE.* — verified against
19
+ // calls-sdk-react-native skills/session-settings.)
20
+ // Session type is the sessionSettings.sessionType field ('VIDEO' | 'VOICE'), not an enum import.
19
21
 
20
- // Mid-call switch
21
- CometChatCalls.setLayout(CometChatCalls.constants.LAYOUT.SPOTLIGHT);
22
+ // Mid-call switch — setLayout takes a bare string literal:
23
+ CometChatCalls.setLayout("SPOTLIGHT"); // "TILE" | "SIDEBAR" | "SPOTLIGHT"
22
24
 
23
25
  // Listen
24
- CometChatCalls.addEventListener("onCallLayoutChanged", (layout) => {
26
+ const off = CometChatCalls.addEventListener("onCallLayoutChanged", (layout) => {
25
27
  // ...
26
28
  });
29
+ // later: off(); // addEventListener returns the unsubscribe fn
27
30
 
28
- // Hide kit switcher
29
- const settings2 = new CallSettingsBuilder()
30
- .setHideChangeLayoutButton(true)
31
- .build();
31
+ // Hide the kit's change-layout button: it's a SessionSettings OBJECT field
32
+ // (hideChangeLayoutButton), passed to <CometChatCalls.Component />, not a builder method.
32
33
  ```
33
34
 
34
35
  ---
@@ -46,8 +47,8 @@ export function LayoutSwitcher() {
46
47
 
47
48
  useEffect(() => {
48
49
  const sub = (next: string) => setLayout(next as typeof LAYOUTS[number]);
49
- CometChatCalls.addEventListener("onCallLayoutChanged", sub);
50
- return () => CometChatCalls.removeEventListener("onCallLayoutChanged", sub);
50
+ const off = CometChatCalls.addEventListener("onCallLayoutChanged", sub);
51
+ return () => off();
51
52
  }, []);
52
53
 
53
54
  return (
@@ -109,7 +110,7 @@ Web sister rules apply, plus RN-specific:
109
110
 
110
111
  ## Verification checklist
111
112
 
112
- - [ ] Initial layout via `setLayout()` on the builder
113
+ - [ ] Layout switched via `CometChatCalls.setLayout("…")` (bare string literal)
113
114
  - [ ] Switcher uses `Pressable` with `accessibilityRole="radio"`
114
115
  - [ ] Layout listener cleaned up on unmount
115
116
  - [ ] Orientation change handled (or explicitly stable)
@@ -1,6 +1,6 @@
1
1
  # Call session — joinSession with no ringing (React Native)
2
2
 
3
- Server-generated sessionId, both parties enter it; RN uses a **declarative `<CometChatCalls.Component>` render primitive**, NOT the imperative `joinSession(token, settings, container)` web pattern. Customer-validated against `~/Downloads/calls-sdk/calls-sdk-react-native-5/sample-apps/cometchat-calls-sample-app-react-native/src/pages/join-session/JoinSession.tsx`.
3
+ Server-generated sessionId, both parties enter it; RN uses a **declarative `<CometChatCalls.Component>` render primitive**, NOT the imperative `joinSession(token, settings, container)` web pattern. Customer-validated against `calls-sdk-react-native-5/sample-apps/cometchat-calls-sample-app-react-native/src/pages/join-session/JoinSession.tsx`.
4
4
 
5
5
  **Read first:** `cometchat-react-calls/references/call-session.md` — full architecture (sessionId strategies, server-side authorization, token generation). Then come back here for the RN-specific render shape.
6
6
 
@@ -178,5 +178,5 @@ iOS `Info.plist`: `NSCameraUsageDescription`, `NSMicrophoneUsageDescription`. An
178
178
  - `cometchat-react-calls/references/call-session.md` — cross-platform architecture (sessionId strategies, server authorization)
179
179
  - `cometchat-native-calls/SKILL.md` — RN seven hard rules
180
180
  - `cometchat-native-calls/references/share-invite.md` — deep-link config
181
- - Upstream RN sample — `~/Downloads/calls-sdk/calls-sdk-react-native-5/sample-apps/cometchat-calls-sample-app-react-native/src/pages/join-session/JoinSession.tsx`
181
+ - Upstream RN sample — `calls-sdk-react-native-5/sample-apps/cometchat-calls-sample-app-react-native/src/pages/join-session/JoinSession.tsx`
182
182
  - Canonical docs: https://www.cometchat.com/docs/calls/react-native/join-session
@@ -108,11 +108,15 @@ export function CustomOngoingCallScreen({ sessionId, authToken, isAudioOnly, onC
108
108
  muted={muted}
109
109
  cameraOff={cameraOff}
110
110
  onToggleMute={() => {
111
- CometChatCalls.muteAudio(!muted);
111
+ // No-arg methods: muteAudio() / unmuteAudio() (no boolean param).
112
+ if (muted) CometChatCalls.unmuteAudio();
113
+ else CometChatCalls.muteAudio();
112
114
  setMuted(!muted);
113
115
  }}
114
116
  onToggleCamera={() => {
115
- CometChatCalls.pauseVideo(!cameraOff);
117
+ // No-arg methods: pauseVideo() / resumeVideo() (no boolean param).
118
+ if (cameraOff) CometChatCalls.resumeVideo();
119
+ else CometChatCalls.pauseVideo();
116
120
  setCameraOff(!cameraOff);
117
121
  }}
118
122
  onSwitchCamera={() => CometChatCalls.switchCamera()}
@@ -206,14 +210,14 @@ Without `InCallManager.stop()`, the app's other audio (music, video) routes thro
206
210
 
207
211
  For multi-party calls where you want to highlight whoever's speaking:
208
212
 
213
+ The event is `onDominantSpeakerChanged` (there is no `onActiveSpeakerUpdated`). Use `addEventListener` (returns an unsubscribe fn) — `OngoingCallListener` is the @deprecated v4 path:
214
+
209
215
  ```ts
210
- const listener = new CometChatCalls.OngoingCallListener({
211
- onActiveSpeakerUpdated: (uid: string) => {
212
- setActiveSpeakerUid(uid);
213
- // Re-layout: move that uid's tile to a larger position
214
- },
215
- // ...
216
+ const off = CometChatCalls.addEventListener("onDominantSpeakerChanged", (uid: string) => {
217
+ setActiveSpeakerUid(uid);
218
+ // Re-layout: move that uid's tile to a larger position
216
219
  });
220
+ // cleanup: off();
217
221
  ```
218
222
 
219
223
  Not all SDK versions emit this event reliably; verify with the version you're on before relying on it.