@cometchat/skills 4.4.2 → 5.0.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 (490) hide show
  1. package/.claude-plugin/marketplace.json +55 -0
  2. package/.claude-plugin/plugin.json +14 -0
  3. package/CHANGELOG.md +36 -0
  4. package/LICENSE +21 -0
  5. package/README.md +41 -163
  6. package/RULES.md +114 -0
  7. package/bin/cometchat-skills.mjs +1180 -0
  8. package/bin/legacy-skills.json +95 -0
  9. package/catalogs/android-v6.json +1646 -0
  10. package/catalogs/flutter-v6.json +651 -0
  11. package/catalogs/ios-v5.json +1383 -0
  12. package/catalogs/rn-calls-v5.json +134 -0
  13. package/catalogs/rn-calls-v5.symbols.txt +58 -0
  14. package/catalogs/rn-sdk-v4.json +672 -0
  15. package/catalogs/rn-v5.json +449 -0
  16. package/catalogs/rn-v5.symbols.txt +216 -0
  17. package/catalogs/sdk-android-v5.json +514 -0
  18. package/contracts.android-calls-v5.json +122 -0
  19. package/contracts.android-v6.json +135 -0
  20. package/contracts.angular-v5.json +694 -0
  21. package/contracts.flutter-calls-v5.json +77 -0
  22. package/contracts.flutter-v6.json +126 -0
  23. package/contracts.ios-calls-v5.json +67 -0
  24. package/contracts.ios-v5.json +436 -0
  25. package/contracts.json +82 -0
  26. package/contracts.rn-calls-v5.json +77 -0
  27. package/contracts.rn-v5.json +727 -0
  28. package/contracts.sdk-android-v5.json +15 -0
  29. package/contracts.web-calls-v5.json +45 -0
  30. package/features.android-calls-v5.json +246 -0
  31. package/features.android-v6.json +65 -0
  32. package/features.angular-v5.json +521 -0
  33. package/features.flutter-calls-v5.json +286 -0
  34. package/features.flutter-v6.json +484 -0
  35. package/features.ios-calls-v5.json +236 -0
  36. package/features.ios-v5.json +573 -0
  37. package/features.json +61 -0
  38. package/features.rn-calls-v5.json +187 -0
  39. package/features.rn-v5.json +614 -0
  40. package/features.sdk-android-v5.json +40 -0
  41. package/features.sdk-jsv4.json +24 -0
  42. package/features.web-calls-v5.json +108 -0
  43. package/package.json +151 -74
  44. package/peers.yaml +312 -0
  45. package/registry/README.md +31 -0
  46. package/registry/android-calls-v5.json +54 -0
  47. package/registry/android-v6.json +137 -0
  48. package/registry/angular-v5.json +114 -0
  49. package/registry/flutter-calls-v5.json +54 -0
  50. package/registry/flutter-v6.json +119 -0
  51. package/registry/ios-calls-v5.json +59 -0
  52. package/registry/ios-v5.json +97 -0
  53. package/registry/rn-calls-v5.json +59 -0
  54. package/registry/rn-v5.json +129 -0
  55. package/registry/sdk-android-v5.json +53 -0
  56. package/registry/sdk-jsv4.json +53 -0
  57. package/registry/web-calls-v5.json +54 -0
  58. package/registry/web-v7.json +99 -0
  59. package/skills/cometchat/SKILL.md +42 -2096
  60. package/skills/cometchat-android-v5-calls-sdk/SKILL.md +206 -0
  61. package/skills/cometchat-android-v5-calls-sdk/references/build-truth.md +63 -0
  62. package/skills/cometchat-android-v5-calls-sdk/references/docs-map.md +119 -0
  63. package/skills/cometchat-android-v5-calls-sdk/references/method-map.md +53 -0
  64. package/skills/cometchat-android-v5-calls-sdk/references/pitfalls.md +72 -0
  65. package/skills/cometchat-android-v5-calls-sdk/references/ringing.md +92 -0
  66. package/skills/cometchat-android-v5-calls-sdk/references/user-switch.md +90 -0
  67. package/skills/cometchat-android-v5-sdk/SKILL.md +127 -0
  68. package/skills/cometchat-android-v5-sdk/references/app-surface.md +88 -0
  69. package/skills/cometchat-android-v5-sdk/references/docs-map.md +91 -0
  70. package/skills/cometchat-android-v6-builder-settings/SKILL.md +51 -137
  71. package/skills/cometchat-android-v6-calls/SKILL.md +128 -413
  72. package/skills/cometchat-android-v6-compose-components/SKILL.md +84 -194
  73. package/skills/cometchat-android-v6-compose-customization/SKILL.md +66 -411
  74. package/skills/cometchat-android-v6-compose-placement/SKILL.md +154 -237
  75. package/skills/cometchat-android-v6-core/SKILL.md +236 -672
  76. package/skills/cometchat-android-v6-core/references/anti-patterns.md +31 -0
  77. package/skills/cometchat-android-v6-core/references/component-props.md +168 -0
  78. package/skills/cometchat-android-v6-core/references/docs-map.md +153 -0
  79. package/skills/cometchat-android-v6-core/references/layout.md +112 -0
  80. package/skills/cometchat-android-v6-core/references/lifecycle.md +75 -0
  81. package/skills/cometchat-android-v6-core/references/setup-credentials.md +105 -0
  82. package/skills/cometchat-android-v6-core/references/troubleshooting.md +36 -0
  83. package/skills/cometchat-android-v6-events/SKILL.md +46 -184
  84. package/skills/cometchat-android-v6-extensions/SKILL.md +39 -179
  85. package/skills/cometchat-android-v6-features/SKILL.md +74 -143
  86. package/skills/cometchat-android-v6-kotlin-components/SKILL.md +75 -193
  87. package/skills/cometchat-android-v6-kotlin-customization/SKILL.md +67 -419
  88. package/skills/cometchat-android-v6-kotlin-placement/SKILL.md +77 -223
  89. package/skills/cometchat-android-v6-migration/SKILL.md +67 -378
  90. package/skills/cometchat-android-v6-production/SKILL.md +40 -179
  91. package/skills/cometchat-android-v6-push/SKILL.md +39 -289
  92. package/skills/cometchat-android-v6-testing/SKILL.md +50 -265
  93. package/skills/cometchat-android-v6-troubleshooting/SKILL.md +70 -254
  94. package/skills/cometchat-angular-v5-calls/SKILL.md +193 -0
  95. package/skills/cometchat-angular-v5-components/SKILL.md +131 -0
  96. package/skills/cometchat-angular-v5-components/references/catalog.md +111 -0
  97. package/skills/cometchat-angular-v5-components/references/host-composed.md +46 -0
  98. package/skills/cometchat-angular-v5-core/SKILL.md +300 -0
  99. package/skills/cometchat-angular-v5-core/references/anti-patterns.md +49 -0
  100. package/skills/cometchat-angular-v5-core/references/component-props.md +55 -0
  101. package/skills/cometchat-angular-v5-core/references/dependencies.md +66 -0
  102. package/skills/cometchat-angular-v5-core/references/docs-map.md +132 -0
  103. package/skills/cometchat-angular-v5-core/references/layout.md +64 -0
  104. package/skills/cometchat-angular-v5-core/references/lifecycle.md +202 -0
  105. package/skills/cometchat-angular-v5-core/references/setup-credentials.md +137 -0
  106. package/skills/cometchat-angular-v5-core/references/theming.md +70 -0
  107. package/skills/cometchat-angular-v5-core/references/troubleshooting.md +27 -0
  108. package/skills/cometchat-angular-v5-customization/SKILL.md +94 -0
  109. package/skills/cometchat-angular-v5-features/SKILL.md +107 -0
  110. package/skills/cometchat-angular-v5-features/references/custom-messages.md +133 -0
  111. package/skills/cometchat-angular-v5-features/references/formatters.md +28 -0
  112. package/skills/cometchat-angular-v5-features/references/host-composed-extensions.md +85 -0
  113. package/skills/cometchat-angular-v5-migration/SKILL.md +40 -0
  114. package/skills/cometchat-angular-v5-migration/references/migration-guide.md +165 -0
  115. package/skills/cometchat-angular-v5-patterns/SKILL.md +107 -0
  116. package/skills/cometchat-angular-v5-placement/SKILL.md +133 -0
  117. package/skills/cometchat-angular-v5-placement/references/combined-app.md +174 -0
  118. package/skills/cometchat-angular-v5-placement/references/core-surface.md +199 -0
  119. package/skills/cometchat-angular-v5-production/SKILL.md +101 -0
  120. package/skills/cometchat-angular-v5-push/SKILL.md +61 -0
  121. package/skills/cometchat-angular-v5-testing/SKILL.md +112 -0
  122. package/skills/cometchat-angular-v5-troubleshooting/SKILL.md +96 -0
  123. package/skills/cometchat-flutter-v5-sdk/SKILL.md +188 -0
  124. package/skills/cometchat-flutter-v5-sdk/references/doc-corrections.md +55 -0
  125. package/skills/cometchat-flutter-v5-sdk/references/docs-map.md +211 -0
  126. package/skills/cometchat-flutter-v5-sdk/references/platform-notes.md +48 -0
  127. package/skills/cometchat-flutter-v5-sdk/references/transcription.md +87 -0
  128. package/skills/cometchat-flutter-v6-calls/SKILL.md +75 -389
  129. package/skills/cometchat-flutter-v6-components/SKILL.md +88 -361
  130. package/skills/cometchat-flutter-v6-core/SKILL.md +154 -593
  131. package/skills/cometchat-flutter-v6-core/references/anti-patterns.md +55 -0
  132. package/skills/cometchat-flutter-v6-core/references/docs-map.md +143 -0
  133. package/skills/cometchat-flutter-v6-core/references/layout.md +45 -0
  134. package/skills/cometchat-flutter-v6-core/references/lifecycle.md +87 -0
  135. package/skills/cometchat-flutter-v6-core/references/setup-credentials.md +84 -0
  136. package/skills/cometchat-flutter-v6-core/references/troubleshooting.md +26 -0
  137. package/skills/cometchat-flutter-v6-customization/SKILL.md +70 -712
  138. package/skills/cometchat-flutter-v6-events/SKILL.md +79 -174
  139. package/skills/cometchat-flutter-v6-features/SKILL.md +55 -394
  140. package/skills/cometchat-flutter-v6-migration/SKILL.md +68 -367
  141. package/skills/cometchat-flutter-v6-migration/references/migration-guide.md +131 -0
  142. package/skills/cometchat-flutter-v6-patterns/SKILL.md +61 -0
  143. package/skills/cometchat-flutter-v6-placement/SKILL.md +94 -381
  144. package/skills/cometchat-flutter-v6-production/SKILL.md +58 -615
  145. package/skills/cometchat-flutter-v6-push/SKILL.md +46 -455
  146. package/skills/cometchat-flutter-v6-testing/SKILL.md +68 -299
  147. package/skills/cometchat-flutter-v6-troubleshooting/SKILL.md +54 -878
  148. package/skills/cometchat-ios-calls/SKILL.md +112 -563
  149. package/skills/cometchat-ios-components/SKILL.md +44 -834
  150. package/skills/cometchat-ios-core/SKILL.md +181 -1068
  151. package/skills/cometchat-ios-core/references/anti-patterns.md +80 -0
  152. package/skills/cometchat-ios-core/references/docs-map.md +123 -0
  153. package/skills/cometchat-ios-core/references/install.md +23 -0
  154. package/skills/cometchat-ios-core/references/layout.md +186 -0
  155. package/skills/cometchat-ios-core/references/setup-credentials.md +197 -0
  156. package/skills/cometchat-ios-core/references/swiftui.md +91 -0
  157. package/skills/cometchat-ios-core/references/troubleshooting.md +100 -0
  158. package/skills/cometchat-ios-customization/SKILL.md +33 -968
  159. package/skills/cometchat-ios-features/SKILL.md +29 -738
  160. package/skills/cometchat-ios-migration/SKILL.md +39 -0
  161. package/skills/cometchat-ios-placement/SKILL.md +51 -729
  162. package/skills/cometchat-ios-push/SKILL.md +24 -602
  163. package/skills/cometchat-ios-v5-sdk/SKILL.md +161 -0
  164. package/skills/cometchat-ios-v5-sdk/references/docs-map.md +326 -0
  165. package/skills/cometchat-js-v5-sdk/SKILL.md +95 -0
  166. package/skills/cometchat-js-v5-sdk/references/docs-map.md +114 -0
  167. package/skills/cometchat-onboarding/SKILL.md +89 -0
  168. package/skills/cometchat-onboarding/references/archetypes.md +51 -0
  169. package/skills/cometchat-onboarding/references/calling-first.md +77 -0
  170. package/skills/cometchat-onboarding/references/not-in-this-pack.md +8 -0
  171. package/skills/cometchat-onboarding/references/plan-artifact.md +133 -0
  172. package/skills/cometchat-onboarding/references/platforms.md +90 -0
  173. package/skills/cometchat-react-native-bare-patterns/SKILL.md +120 -0
  174. package/skills/cometchat-react-native-calls/SKILL.md +200 -0
  175. package/skills/cometchat-react-native-components/SKILL.md +142 -0
  176. package/skills/cometchat-react-native-core/SKILL.md +313 -0
  177. package/skills/cometchat-react-native-core/references/anti-patterns.md +79 -0
  178. package/skills/cometchat-react-native-core/references/component-props.md +105 -0
  179. package/skills/cometchat-react-native-core/references/dependencies.md +62 -0
  180. package/skills/cometchat-react-native-core/references/docs-map.md +126 -0
  181. package/skills/cometchat-react-native-core/references/layout.md +61 -0
  182. package/skills/cometchat-react-native-core/references/lifecycle.md +64 -0
  183. package/skills/cometchat-react-native-core/references/setup-credentials.md +39 -0
  184. package/skills/cometchat-react-native-customization/SKILL.md +198 -0
  185. package/skills/cometchat-react-native-expo-patterns/SKILL.md +116 -0
  186. package/skills/cometchat-react-native-features/SKILL.md +122 -0
  187. package/skills/cometchat-react-native-migration/SKILL.md +103 -0
  188. package/skills/cometchat-react-native-placement/SKILL.md +158 -0
  189. package/skills/cometchat-react-native-production/SKILL.md +78 -0
  190. package/skills/cometchat-react-native-push/SKILL.md +88 -0
  191. package/skills/cometchat-react-native-sdk/SKILL.md +126 -0
  192. package/skills/cometchat-react-native-sdk/references/method-map.md +239 -0
  193. package/skills/cometchat-react-native-sdk/references/page-map.md +96 -0
  194. package/skills/cometchat-react-native-testing/SKILL.md +94 -0
  195. package/skills/cometchat-react-native-troubleshooting/SKILL.md +116 -0
  196. package/skills/cometchat-react-native-v5-sdk/SKILL.md +150 -0
  197. package/skills/cometchat-react-native-v5-sdk/references/docs-map.md +127 -0
  198. package/skills/cometchat-react-native-v5-sdk/references/ringing-voip.md +369 -0
  199. package/skills/cometchat-react-v7-calls/SKILL.md +75 -0
  200. package/skills/cometchat-react-v7-components/SKILL.md +72 -0
  201. package/skills/cometchat-react-v7-core/SKILL.md +101 -0
  202. package/skills/cometchat-react-v7-core/references/anti-patterns.md +19 -0
  203. package/skills/cometchat-react-v7-core/references/component-props.md +82 -0
  204. package/skills/cometchat-react-v7-core/references/dependencies.md +23 -0
  205. package/skills/cometchat-react-v7-core/references/docs-map.md +117 -0
  206. package/skills/cometchat-react-v7-core/references/i18n-rtl-a11y.md +22 -0
  207. package/skills/cometchat-react-v7-core/references/layout.md +158 -0
  208. package/skills/cometchat-react-v7-core/references/lifecycle.md +74 -0
  209. package/skills/cometchat-react-v7-core/references/setup-credentials.md +58 -0
  210. package/skills/cometchat-react-v7-core/references/ssr.md +11 -0
  211. package/skills/cometchat-react-v7-core/references/theming.md +52 -0
  212. package/skills/cometchat-react-v7-core/references/troubleshooting.md +28 -0
  213. package/skills/cometchat-react-v7-customization/SKILL.md +84 -0
  214. package/skills/cometchat-react-v7-features/SKILL.md +92 -0
  215. package/skills/cometchat-react-v7-migration/SKILL.md +39 -0
  216. package/skills/cometchat-react-v7-migration/references/migration-guide.md +119 -0
  217. package/skills/cometchat-react-v7-patterns/SKILL.md +43 -0
  218. package/skills/cometchat-react-v7-placement/SKILL.md +106 -0
  219. package/skills/cometchat-react-v7-placement/references/recipes.md +354 -0
  220. package/skills/cometchat-react-v7-push/SKILL.md +53 -0
  221. package/test-suite/README.md +70 -0
  222. package/test-suite/catalogs/android-calls-v5.json +830 -0
  223. package/test-suite/catalogs/android-calls-v5.symbols.txt +499 -0
  224. package/test-suite/catalogs/android-v6.json +1646 -0
  225. package/test-suite/catalogs/android-v6.symbols.txt +298 -0
  226. package/test-suite/catalogs/angular-v5.json +7587 -0
  227. package/test-suite/catalogs/flutter-calls-v5.json +196 -0
  228. package/test-suite/catalogs/flutter-calls-v5.symbols.txt +59 -0
  229. package/test-suite/catalogs/flutter-v6.json +651 -0
  230. package/test-suite/catalogs/ios-calls-v5.json +158 -0
  231. package/test-suite/catalogs/ios-calls-v5.symbols.txt +70 -0
  232. package/test-suite/catalogs/ios-v5.json +1383 -0
  233. package/test-suite/catalogs/ios-v5.symbols.txt +699 -0
  234. package/test-suite/catalogs/rn-calls-v5.json +134 -0
  235. package/test-suite/catalogs/rn-sdk-v4.json +672 -0
  236. package/test-suite/catalogs/rn-v5.json +449 -0
  237. package/test-suite/catalogs/sdk-android-v5.json +514 -0
  238. package/test-suite/catalogs/sdk-android-v5.symbols.txt +254 -0
  239. package/test-suite/catalogs/sdk-jsv4.json +800 -0
  240. package/test-suite/catalogs/web-calls-v5.json +195 -0
  241. package/test-suite/catalogs/web-v7.json +1243 -0
  242. package/test-suite/scripts/build-registry.mjs +113 -0
  243. package/test-suite/scripts/catalog-refresh-dart.mjs +151 -0
  244. package/test-suite/scripts/catalog-refresh.mjs +100 -0
  245. package/test-suite/scripts/lint-skills.mjs +909 -0
  246. package/test-suite/scripts/measure-tokens.mjs +169 -0
  247. package/test-suite/scripts/typecheck-fences-dart.mjs +437 -0
  248. package/test-suite/scripts/typecheck-fences-kotlin.mjs +269 -0
  249. package/test-suite/scripts/typecheck-fences.mjs +206 -0
  250. package/test-suite/scripts/verify-catalog.mjs +242 -0
  251. package/test-suite/scripts/verify-contract-fences.mjs +94 -0
  252. package/test-suite/scripts/verify-detection.mjs +178 -0
  253. package/test-suite/scripts/verify-docs-base.mjs +91 -0
  254. package/test-suite/scripts/verify-family-agnostic.mjs +130 -0
  255. package/test-suite/scripts/verify-golden-path.mjs +138 -0
  256. package/test-suite/scripts/verify-oracle-components.mjs +133 -0
  257. package/test-suite/scripts/verify-template-bindings.mjs +148 -0
  258. package/test-suite/typecheck/angular-v5/package.json +21 -0
  259. package/test-suite/typecheck/angular-v5/tsconfig.json +21 -0
  260. package/test-suite/typecheck/flutter-v6/analysis_options.yaml +25 -0
  261. package/test-suite/typecheck/flutter-v6/pubspec.yaml +21 -0
  262. package/test-suite/typecheck/web-v7/package.json +18 -0
  263. package/test-suite/typecheck/web-v7/tsconfig.json +19 -0
  264. package/bin/install.js +0 -1003
  265. package/skills/.claude-plugin/marketplace.json +0 -86
  266. package/skills/cometchat/references/asking-questions.md +0 -48
  267. package/skills/cometchat-a11y/SKILL.md +0 -477
  268. package/skills/cometchat-android-v5/SKILL.md +0 -121
  269. package/skills/cometchat-android-v5-calls/SKILL.md +0 -429
  270. package/skills/cometchat-android-v5-calls/references/README.md +0 -53
  271. package/skills/cometchat-android-v5-calls/references/add-calls-to-existing-chat.md +0 -197
  272. package/skills/cometchat-android-v5-calls/references/audio-controls.md +0 -91
  273. package/skills/cometchat-android-v5-calls/references/background-handling.md +0 -168
  274. package/skills/cometchat-android-v5-calls/references/call-layouts.md +0 -131
  275. package/skills/cometchat-android-v5-calls/references/call-logs.md +0 -113
  276. package/skills/cometchat-android-v5-calls/references/call-session.md +0 -274
  277. package/skills/cometchat-android-v5-calls/references/custom-ui.md +0 -150
  278. package/skills/cometchat-android-v5-calls/references/event-listeners.md +0 -123
  279. package/skills/cometchat-android-v5-calls/references/group-calls.md +0 -205
  280. package/skills/cometchat-android-v5-calls/references/idle-timeout.md +0 -117
  281. package/skills/cometchat-android-v5-calls/references/in-call-chat.md +0 -134
  282. package/skills/cometchat-android-v5-calls/references/join-session.md +0 -120
  283. package/skills/cometchat-android-v5-calls/references/migration-v4-to-v5.md +0 -222
  284. package/skills/cometchat-android-v5-calls/references/participant-management.md +0 -110
  285. package/skills/cometchat-android-v5-calls/references/picture-in-picture.md +0 -106
  286. package/skills/cometchat-android-v5-calls/references/raise-hand.md +0 -248
  287. package/skills/cometchat-android-v5-calls/references/recording.md +0 -101
  288. package/skills/cometchat-android-v5-calls/references/ringing-integration.md +0 -152
  289. package/skills/cometchat-android-v5-calls/references/screen-sharing.md +0 -78
  290. package/skills/cometchat-android-v5-calls/references/server-fcm-voip.md +0 -215
  291. package/skills/cometchat-android-v5-calls/references/session-settings.md +0 -121
  292. package/skills/cometchat-android-v5-calls/references/setup.md +0 -137
  293. package/skills/cometchat-android-v5-calls/references/share-invite.md +0 -156
  294. package/skills/cometchat-android-v5-calls/references/video-controls.md +0 -87
  295. package/skills/cometchat-android-v5-calls/references/voip-calling.md +0 -526
  296. package/skills/cometchat-android-v5-components/SKILL.md +0 -431
  297. package/skills/cometchat-android-v5-core/SKILL.md +0 -486
  298. package/skills/cometchat-android-v5-customization/SKILL.md +0 -469
  299. package/skills/cometchat-android-v5-extensions/SKILL.md +0 -127
  300. package/skills/cometchat-android-v5-features/SKILL.md +0 -131
  301. package/skills/cometchat-android-v5-placement/SKILL.md +0 -277
  302. package/skills/cometchat-android-v5-production/SKILL.md +0 -95
  303. package/skills/cometchat-android-v5-push/SKILL.md +0 -619
  304. package/skills/cometchat-android-v5-testing/SKILL.md +0 -188
  305. package/skills/cometchat-android-v5-theming/SKILL.md +0 -167
  306. package/skills/cometchat-android-v5-troubleshooting/SKILL.md +0 -74
  307. package/skills/cometchat-android-v6/SKILL.md +0 -108
  308. package/skills/cometchat-android-v6-calls/references/add-calls-to-existing-chat.md +0 -97
  309. package/skills/cometchat-android-v6-calls/references/advanced-features.md +0 -87
  310. package/skills/cometchat-android-v6-calls/references/call-layouts.md +0 -100
  311. package/skills/cometchat-android-v6-calls/references/call-session.md +0 -163
  312. package/skills/cometchat-android-v6-calls/references/device-management.md +0 -172
  313. package/skills/cometchat-android-v6-calls/references/group-calls.md +0 -191
  314. package/skills/cometchat-android-v6-calls/references/idle-timeout.md +0 -110
  315. package/skills/cometchat-android-v6-calls/references/in-call-chat.md +0 -141
  316. package/skills/cometchat-android-v6-calls/references/raise-hand.md +0 -188
  317. package/skills/cometchat-android-v6-calls/references/ringing-integration.md +0 -176
  318. package/skills/cometchat-android-v6-calls/references/server-fcm-voip.md +0 -127
  319. package/skills/cometchat-android-v6-calls/references/share-invite.md +0 -105
  320. package/skills/cometchat-android-v6-compose-theming/SKILL.md +0 -250
  321. package/skills/cometchat-android-v6-kotlin-theming/SKILL.md +0 -233
  322. package/skills/cometchat-angular-calls/SKILL.md +0 -380
  323. package/skills/cometchat-angular-calls/references/add-calls-to-existing-chat.md +0 -96
  324. package/skills/cometchat-angular-calls/references/call-layouts.md +0 -123
  325. package/skills/cometchat-angular-calls/references/call-session.md +0 -167
  326. package/skills/cometchat-angular-calls/references/custom-ui.md +0 -239
  327. package/skills/cometchat-angular-calls/references/device-management.md +0 -154
  328. package/skills/cometchat-angular-calls/references/group-calls.md +0 -433
  329. package/skills/cometchat-angular-calls/references/idle-timeout.md +0 -161
  330. package/skills/cometchat-angular-calls/references/in-call-chat.md +0 -148
  331. package/skills/cometchat-angular-calls/references/lazy-loading-pitfalls.md +0 -205
  332. package/skills/cometchat-angular-calls/references/migration-v4-to-v5.md +0 -53
  333. package/skills/cometchat-angular-calls/references/ngzone-and-async-callbacks.md +0 -184
  334. package/skills/cometchat-angular-calls/references/picture-in-picture.md +0 -285
  335. package/skills/cometchat-angular-calls/references/raise-hand.md +0 -172
  336. package/skills/cometchat-angular-calls/references/recording-screen-share.md +0 -260
  337. package/skills/cometchat-angular-calls/references/ringing-integration.md +0 -133
  338. package/skills/cometchat-angular-calls/references/server-web-push-vapid.md +0 -100
  339. package/skills/cometchat-angular-calls/references/share-invite.md +0 -122
  340. package/skills/cometchat-angular-calls/references/virtual-background.md +0 -29
  341. package/skills/cometchat-angular-components/SKILL.md +0 -235
  342. package/skills/cometchat-angular-core/SKILL.md +0 -386
  343. package/skills/cometchat-angular-customization/SKILL.md +0 -616
  344. package/skills/cometchat-angular-features/SKILL.md +0 -329
  345. package/skills/cometchat-angular-patterns/SKILL.md +0 -256
  346. package/skills/cometchat-angular-placement/SKILL.md +0 -314
  347. package/skills/cometchat-angular-production/SKILL.md +0 -564
  348. package/skills/cometchat-angular-push/SKILL.md +0 -389
  349. package/skills/cometchat-angular-testing/SKILL.md +0 -605
  350. package/skills/cometchat-angular-theming/SKILL.md +0 -290
  351. package/skills/cometchat-angular-troubleshooting/SKILL.md +0 -364
  352. package/skills/cometchat-astro-patterns/SKILL.md +0 -708
  353. package/skills/cometchat-calls/SKILL.md +0 -364
  354. package/skills/cometchat-calls/references/use-case-broadcast.md +0 -199
  355. package/skills/cometchat-calls/references/use-case-marketplace.md +0 -157
  356. package/skills/cometchat-calls/references/use-case-support.md +0 -189
  357. package/skills/cometchat-calls/references/use-case-team.md +0 -180
  358. package/skills/cometchat-calls/references/use-case-telehealth.md +0 -153
  359. package/skills/cometchat-components/SKILL.md +0 -1142
  360. package/skills/cometchat-core/SKILL.md +0 -1048
  361. package/skills/cometchat-customization/SKILL.md +0 -580
  362. package/skills/cometchat-customization/references/component-catalog.md +0 -236
  363. package/skills/cometchat-features/SKILL.md +0 -861
  364. package/skills/cometchat-flutter-v5/SKILL.md +0 -173
  365. package/skills/cometchat-flutter-v5-calls/SKILL.md +0 -455
  366. package/skills/cometchat-flutter-v5-calls/references/add-calls-to-existing-chat.md +0 -193
  367. package/skills/cometchat-flutter-v5-calls/references/call-layouts.md +0 -103
  368. package/skills/cometchat-flutter-v5-calls/references/call-session.md +0 -285
  369. package/skills/cometchat-flutter-v5-calls/references/device-management.md +0 -124
  370. package/skills/cometchat-flutter-v5-calls/references/group-calls.md +0 -181
  371. package/skills/cometchat-flutter-v5-calls/references/idle-timeout.md +0 -99
  372. package/skills/cometchat-flutter-v5-calls/references/in-call-chat.md +0 -135
  373. package/skills/cometchat-flutter-v5-calls/references/migration-v4-to-v5.md +0 -210
  374. package/skills/cometchat-flutter-v5-calls/references/raise-hand.md +0 -255
  375. package/skills/cometchat-flutter-v5-calls/references/ringing-integration.md +0 -196
  376. package/skills/cometchat-flutter-v5-calls/references/server-push-bridge.md +0 -101
  377. package/skills/cometchat-flutter-v5-calls/references/share-invite.md +0 -148
  378. package/skills/cometchat-flutter-v5-conversations/SKILL.md +0 -118
  379. package/skills/cometchat-flutter-v5-core/SKILL.md +0 -239
  380. package/skills/cometchat-flutter-v5-customization/SKILL.md +0 -358
  381. package/skills/cometchat-flutter-v5-events/SKILL.md +0 -156
  382. package/skills/cometchat-flutter-v5-messages/SKILL.md +0 -259
  383. package/skills/cometchat-flutter-v5-production/SKILL.md +0 -216
  384. package/skills/cometchat-flutter-v5-push/SKILL.md +0 -285
  385. package/skills/cometchat-flutter-v5-testing/SKILL.md +0 -401
  386. package/skills/cometchat-flutter-v5-theming/SKILL.md +0 -161
  387. package/skills/cometchat-flutter-v5-troubleshooting/SKILL.md +0 -130
  388. package/skills/cometchat-flutter-v5-users-groups/SKILL.md +0 -152
  389. package/skills/cometchat-flutter-v6/SKILL.md +0 -446
  390. package/skills/cometchat-flutter-v6-calls/references/add-calls-to-existing-chat.md +0 -136
  391. package/skills/cometchat-flutter-v6-calls/references/advanced-features.md +0 -89
  392. package/skills/cometchat-flutter-v6-calls/references/call-layouts.md +0 -105
  393. package/skills/cometchat-flutter-v6-calls/references/call-session.md +0 -229
  394. package/skills/cometchat-flutter-v6-calls/references/device-management.md +0 -105
  395. package/skills/cometchat-flutter-v6-calls/references/group-calls.md +0 -190
  396. package/skills/cometchat-flutter-v6-calls/references/idle-timeout.md +0 -88
  397. package/skills/cometchat-flutter-v6-calls/references/in-call-chat.md +0 -125
  398. package/skills/cometchat-flutter-v6-calls/references/raise-hand.md +0 -275
  399. package/skills/cometchat-flutter-v6-calls/references/ringing-integration.md +0 -171
  400. package/skills/cometchat-flutter-v6-calls/references/server-push-bridge.md +0 -93
  401. package/skills/cometchat-flutter-v6-calls/references/share-invite.md +0 -102
  402. package/skills/cometchat-flutter-v6-conversations/SKILL.md +0 -238
  403. package/skills/cometchat-flutter-v6-messages/SKILL.md +0 -384
  404. package/skills/cometchat-flutter-v6-theming/SKILL.md +0 -293
  405. package/skills/cometchat-flutter-v6-users-groups/SKILL.md +0 -224
  406. package/skills/cometchat-i18n/SKILL.md +0 -419
  407. package/skills/cometchat-ios/SKILL.md +0 -325
  408. package/skills/cometchat-ios-calls/references/add-calls-to-existing-chat.md +0 -181
  409. package/skills/cometchat-ios-calls/references/audio-modes-and-controls.md +0 -45
  410. package/skills/cometchat-ios-calls/references/avaudiosession-routing.md +0 -188
  411. package/skills/cometchat-ios-calls/references/call-layouts.md +0 -76
  412. package/skills/cometchat-ios-calls/references/call-session.md +0 -218
  413. package/skills/cometchat-ios-calls/references/callkit-and-pushkit.md +0 -357
  414. package/skills/cometchat-ios-calls/references/custom-ui.md +0 -322
  415. package/skills/cometchat-ios-calls/references/device-management.md +0 -171
  416. package/skills/cometchat-ios-calls/references/group-calls.md +0 -359
  417. package/skills/cometchat-ios-calls/references/idle-timeout.md +0 -184
  418. package/skills/cometchat-ios-calls/references/in-call-chat.md +0 -179
  419. package/skills/cometchat-ios-calls/references/migration-v4-to-v5.md +0 -196
  420. package/skills/cometchat-ios-calls/references/picture-in-picture.md +0 -246
  421. package/skills/cometchat-ios-calls/references/raise-hand.md +0 -26
  422. package/skills/cometchat-ios-calls/references/recording-screen-share.md +0 -252
  423. package/skills/cometchat-ios-calls/references/ringing-integration.md +0 -143
  424. package/skills/cometchat-ios-calls/references/server-apns-pushkit.md +0 -267
  425. package/skills/cometchat-ios-calls/references/share-invite.md +0 -148
  426. package/skills/cometchat-ios-calls/references/swiftui-uikit-hosting.md +0 -246
  427. package/skills/cometchat-ios-calls/references/voip-cert-setup.md +0 -166
  428. package/skills/cometchat-ios-production/SKILL.md +0 -738
  429. package/skills/cometchat-ios-testing/SKILL.md +0 -376
  430. package/skills/cometchat-ios-theming/SKILL.md +0 -667
  431. package/skills/cometchat-ios-troubleshooting/SKILL.md +0 -1003
  432. package/skills/cometchat-native-bare-patterns/SKILL.md +0 -550
  433. package/skills/cometchat-native-calls/SKILL.md +0 -671
  434. package/skills/cometchat-native-calls/references/add-calls-to-existing-chat.md +0 -203
  435. package/skills/cometchat-native-calls/references/call-layouts.md +0 -125
  436. package/skills/cometchat-native-calls/references/call-session.md +0 -182
  437. package/skills/cometchat-native-calls/references/custom-ui.md +0 -254
  438. package/skills/cometchat-native-calls/references/device-management.md +0 -158
  439. package/skills/cometchat-native-calls/references/expo-vs-bare.md +0 -179
  440. package/skills/cometchat-native-calls/references/group-calls.md +0 -296
  441. package/skills/cometchat-native-calls/references/idle-timeout.md +0 -128
  442. package/skills/cometchat-native-calls/references/in-call-chat.md +0 -145
  443. package/skills/cometchat-native-calls/references/migration-v4-to-v5.md +0 -72
  444. package/skills/cometchat-native-calls/references/picture-in-picture.md +0 -276
  445. package/skills/cometchat-native-calls/references/raise-hand.md +0 -205
  446. package/skills/cometchat-native-calls/references/recording-screen-share.md +0 -169
  447. package/skills/cometchat-native-calls/references/ringing-integration.md +0 -118
  448. package/skills/cometchat-native-calls/references/server-push-bridge.md +0 -135
  449. package/skills/cometchat-native-calls/references/server-push-payloads.md +0 -193
  450. package/skills/cometchat-native-calls/references/share-invite.md +0 -146
  451. package/skills/cometchat-native-calls/references/voip-push-end-to-end.md +0 -319
  452. package/skills/cometchat-native-components/SKILL.md +0 -628
  453. package/skills/cometchat-native-core/SKILL.md +0 -679
  454. package/skills/cometchat-native-customization/SKILL.md +0 -716
  455. package/skills/cometchat-native-expo-patterns/SKILL.md +0 -552
  456. package/skills/cometchat-native-features/SKILL.md +0 -638
  457. package/skills/cometchat-native-placement/SKILL.md +0 -509
  458. package/skills/cometchat-native-production/SKILL.md +0 -700
  459. package/skills/cometchat-native-push/SKILL.md +0 -594
  460. package/skills/cometchat-native-testing/SKILL.md +0 -582
  461. package/skills/cometchat-native-theming/SKILL.md +0 -681
  462. package/skills/cometchat-native-troubleshooting/SKILL.md +0 -501
  463. package/skills/cometchat-nextjs-patterns/SKILL.md +0 -899
  464. package/skills/cometchat-placement/SKILL.md +0 -1360
  465. package/skills/cometchat-production/SKILL.md +0 -1027
  466. package/skills/cometchat-react-calls/SKILL.md +0 -752
  467. package/skills/cometchat-react-calls/references/add-calls-to-existing-chat.md +0 -146
  468. package/skills/cometchat-react-calls/references/call-layouts.md +0 -160
  469. package/skills/cometchat-react-calls/references/call-session.md +0 -235
  470. package/skills/cometchat-react-calls/references/custom-ui.md +0 -247
  471. package/skills/cometchat-react-calls/references/device-management.md +0 -210
  472. package/skills/cometchat-react-calls/references/group-calls.md +0 -257
  473. package/skills/cometchat-react-calls/references/idle-timeout.md +0 -188
  474. package/skills/cometchat-react-calls/references/in-call-chat.md +0 -212
  475. package/skills/cometchat-react-calls/references/migration-v4-to-v5.md +0 -170
  476. package/skills/cometchat-react-calls/references/picture-in-picture.md +0 -245
  477. package/skills/cometchat-react-calls/references/raise-hand.md +0 -238
  478. package/skills/cometchat-react-calls/references/recording-screen-share.md +0 -144
  479. package/skills/cometchat-react-calls/references/ringing-integration.md +0 -255
  480. package/skills/cometchat-react-calls/references/server-web-push-vapid.md +0 -241
  481. package/skills/cometchat-react-calls/references/share-invite.md +0 -175
  482. package/skills/cometchat-react-calls/references/testing-calls-on-web.md +0 -216
  483. package/skills/cometchat-react-calls/references/virtual-background.md +0 -32
  484. package/skills/cometchat-react-calls/references/voip-and-web-push.md +0 -165
  485. package/skills/cometchat-react-patterns/SKILL.md +0 -628
  486. package/skills/cometchat-react-push/SKILL.md +0 -634
  487. package/skills/cometchat-react-router-patterns/SKILL.md +0 -758
  488. package/skills/cometchat-react-testing/SKILL.md +0 -413
  489. package/skills/cometchat-theming/SKILL.md +0 -498
  490. package/skills/cometchat-troubleshooting/SKILL.md +0 -294
@@ -1,891 +1,67 @@
1
1
  ---
2
2
  name: cometchat-flutter-v6-troubleshooting
3
- description: >
4
- Diagnose and fix CometChat Flutter UIKit v6 integration problems. Covers init
5
- failures, login errors, UI rendering issues, keyboard problems, call failures,
6
- listener leaks, theme jank, and platform-specific build errors. Use when seeing
7
- errors, crashes, or unexpected behavior with CometChat components.
3
+ description: "Diagnose a broken CometChat Flutter integration — blank screens, unbounded-height crashes, lists that don't fill, login and Region failures, calls that never ring, push that never arrives, and v5 leftovers. Symptom → cause → fix. Triggers: 'cometchat not working flutter', 'blank chat screen', 'RenderFlex unbounded height', 'login failed cometchat', 'calls not ringing', 'push not arriving'."
8
4
  license: "MIT"
9
- compatibility: "cometchat_chat_uikit ^6.0.1"
5
+ compatibility: "Flutter >=3.38.9; cometchat_chat_uikit ^6 (6.1.x, verified 6.1.0); cometchat_sdk ^5.0.6"
10
6
  metadata:
11
7
  author: "CometChat"
12
- version: "3.0.0"
13
- tags: "cometchat flutter troubleshooting errors debugging crashes fixes"
8
+ version: "1.0.0"
9
+ tags: "cometchat flutter troubleshooting diagnostics errors symptoms v6"
14
10
  ---
15
11
 
16
- > **Ground truth:** `cometchat_chat_uikit: ^6.0` pub-cache source + `ui-kit/flutter`. **Official docs:** https://www.cometchat.com/docs/ui-kit/flutter/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.
12
+ > **Ground truth:** every cause below was confirmed against the published 6.1.0 (compiler or documented behaviour). The live page is `/ui-kit/flutter/troubleshooting` via `../cometchat-flutter-v6-core/references/docs-map.md`. The deeper per-topic tables live in core's `references/troubleshooting.md` and `references/anti-patterns.md` this skill is the entry point that ROUTES to the right one.
17
13
 
18
- # CometChat Flutter UIKit v6 — Troubleshooting Guide
14
+ ## Companion skills (read first)
15
+ - `cometchat-flutter-v6-core` — install, credentials, `init→login→render`, plus the reference tables this skill routes into. This skill ASSUMES it.
19
16
 
20
- Comprehensive guide for diagnosing and fixing CometChat Flutter UIKit v6 integration problems.
17
+ ## Use this skill when
18
+ Something is already built and is not working: a blank screen, a crash, an empty list, no ring, no notification.
21
19
 
22
- ---
23
-
24
- ## 1. Quick Diagnosis Flow
25
-
26
- Use this decision tree to jump to the right section:
27
-
28
- ```
29
- What's happening?
30
-
31
- ├─ App crashes or errors on startup
32
- │ └─ Go to → Section 2: Init & Login Errors
33
-
34
- ├─ UI looks wrong, layout broken, keyboard issues
35
- │ └─ Go to → Section 3: UI Rendering Issues
36
-
37
- ├─ Calls not working, call screen blank or stuck
38
- │ ├─ Outgoing screen NEVER renders (peer rings, caller shows nothing) → Section 4.7 (V6 navigatorKey trap)
39
- │ ├─ Stuck on "Calling…" after peer accepts → Section 4.8 (upgrade to 6.0.1)
40
- │ └─ Otherwise → Section 4: Call Issues
41
-
42
- ├─ Events not firing, duplicate events, memory leaks
43
- │ └─ Go to → Section 5: Listener Issues
44
-
45
- ├─ Build fails on Android or iOS
46
- │ └─ Go to → Section 6: Build Errors
47
-
48
- ├─ App is slow, janky scrolling, laggy keyboard
49
- │ └─ Go to → Section 7: Performance Issues
50
-
51
- └─ Platform-specific weirdness (Android/iOS/Web)
52
- └─ Go to → Section 8: Platform-Specific Issues
53
- ```
54
-
55
- ---
56
-
57
- ## 2. Init & Login Errors
58
-
59
- ### 2.1 "Authentication null"
60
-
61
- - **Symptom**: Error message `Authentication null` or `Please log in to CometChat before calling this method` when using any CometChat component or SDK call.
62
- - **Cause**: `CometChatUIKit.init()` was not called, or was called but not awaited before using components or calling login.
63
- - **Fix**: Ensure `init()` completes before any other CometChat usage:
64
-
65
- ```dart
66
- // ✅ CORRECT — await init before anything else
67
- final settings = (UIKitSettingsBuilder()
68
- ..appId = 'APP_ID'
69
- ..region = 'us'
70
- ..authKey = 'AUTH_KEY'
71
- ..subscriptionType = CometChatSubscriptionType.allUsers)
72
- .build();
73
-
74
- await CometChatUIKit.init(
75
- uiKitSettings: settings,
76
- onSuccess: (_) => debugPrint('Init done'),
77
- onError: (e) => debugPrint('Init failed: ${e.message}'),
78
- );
79
-
80
- // ❌ WRONG — login before init completes (race condition)
81
- CometChatUIKit.init(uiKitSettings: settings);
82
- CometChatUIKit.login('uid');
83
- ```
84
-
85
- ### 2.2 "APP ID null"
86
-
87
- - **Symptom**: Error `APP ID null` or `appId is required` during init.
88
- - **Cause**: `appId` not set in `UIKitSettingsBuilder`.
89
- - **Fix**: Set `appId` before calling `.build()`:
90
-
91
- ```dart
92
- final settings = (UIKitSettingsBuilder()
93
- ..appId = 'YOUR_APP_ID' // ← Must be set
94
- ..region = 'us'
95
- ..authKey = 'YOUR_AUTH_KEY')
96
- .build();
97
- ```
98
-
99
- ### 2.3 ERR_ALREADY_LOGGED_IN
100
-
101
- - **Symptom**: Error `ERR_ALREADY_LOGGED_IN` when calling `CometChatUIKit.login()`.
102
- - **Cause**: Calling login when a session already exists. After `init()`, the SDK restores cached sessions automatically.
103
- - **Fix**: Check `CometChatUIKit.loggedInUser` after init before calling login:
104
-
105
- ```dart
106
- CometChatUIKit.init(
107
- uiKitSettings: settings,
108
- onSuccess: (_) {
109
- if (CometChatUIKit.loggedInUser != null) {
110
- // Already logged in — skip login, go to home
111
- navigateToHome();
112
- } else {
113
- // No session — show login screen
114
- navigateToLogin();
115
- }
116
- },
117
- );
118
- ```
119
-
120
- ### 2.4 "Android internal error" on login
121
-
122
- - **Symptom**: Login fails with a vague `Android internal error` message.
123
- - **Cause**: Multiple possible causes — incorrect auth key, UID doesn't exist in CometChat dashboard, beta SDK bug, or network issue.
124
- - **Fix**:
125
- 1. Verify credentials are correct in the CometChat dashboard
126
- 2. Verify the UID exists in the dashboard
127
- 3. Try calling `CometChat.login(uid, authKey)` directly to isolate UIKit vs SDK issue
128
- 4. If using beta SDK, try the stable release
129
- 5. Check network connectivity and firewall rules
130
-
131
- ### 2.5 Guard screen stuck on spinner
132
-
133
- - **Symptom**: App shows a loading spinner forever after init. The auth guard never resolves.
134
- - **Cause**: Using the callback-based `CometChat.getLoggedInUser()` after init instead of the synchronous `CometChatUIKit.loggedInUser`. The callback API silently fails when no session exists — neither `onSuccess` nor `onError` fires.
135
- - **Fix**: Use the synchronous check after init:
136
-
137
- ```dart
138
- // ✅ CORRECT — synchronous check, always resolves
139
- CometChatUIKit.init(
140
- uiKitSettings: settings,
141
- onSuccess: (_) {
142
- final hasUser = CometChatUIKit.loggedInUser != null;
143
- setState(() {
144
- _loggedIn = hasUser;
145
- _initializing = false;
146
- });
147
- },
148
- );
149
-
150
- // ❌ WRONG — callback may never fire when no session exists
151
- CometChatUIKit.init(
152
- uiKitSettings: settings,
153
- onSuccess: (_) {
154
- CometChat.getLoggedInUser(
155
- onSuccess: (user) { /* may never fire */ },
156
- onError: (e) { /* may never fire */ },
157
- );
158
- },
159
- );
160
-
161
- // ❌ ALSO WRONG — redundant native bridge round-trip
162
- CometChatUIKit.init(
163
- uiKitSettings: settings,
164
- onSuccess: (_) async {
165
- final user = await CometChatUIKit.getLoggedInUser(); // Unnecessary!
166
- },
167
- );
168
- ```
169
-
170
- ### 2.6 Region error (ERR_INVALID_REGION)
171
-
172
- - **Symptom**: Init fails with `ERR_INVALID_REGION`.
173
- - **Cause**: Region string is uppercase or not one of the valid values.
174
- - **Fix**: Use lowercase region string — valid values are `'us'`, `'eu'`, `'in'`:
175
-
176
- ```dart
177
- // ✅ CORRECT
178
- ..region = 'us'
179
-
180
- // ❌ WRONG
181
- ..region = 'US'
182
- ..region = 'United States'
183
- ```
184
-
185
- ### 2.7 StateError from uninitialized ServiceLocator
186
-
187
- - **Symptom**: `StateError: not initialized` when creating a BLoC manually.
188
- - **Cause**: Component's `ServiceLocator.instance.setup()` was not called before creating the BLoC. UIKit widgets do this automatically, but manual BLoC creation requires it.
189
- - **Fix**: Call setup before creating the BLoC:
190
-
191
- ```dart
192
- // ✅ CORRECT
193
- ConversationsServiceLocator.instance.setup();
194
- final bloc = ConversationsBloc(
195
- getLoggedInUserUseCase: ConversationsServiceLocator.instance.getLoggedInUserUseCase,
196
- );
197
-
198
- // ❌ WRONG — setup not called
199
- final bloc = ConversationsBloc(
200
- getLoggedInUserUseCase: ConversationsServiceLocator.instance.getLoggedInUserUseCase,
201
- );
202
- ```
203
-
204
- ---
205
-
206
- ## 3. UI Rendering Issues
207
-
208
- ### 3.1 Double keyboard compensation (layout jumps) — PRE-6.0.1 symptom
209
-
210
- - **Symptom**: When the keyboard opens, the message list jumps or there's extra white space. Content shifts twice — once from Flutter's Scaffold resize, once from the composer's internal keyboard handling.
211
- - **Cause**: A **pre-6.0.1** kit. Before kit fix **ENG-34434**, the composer did not clamp its keyboard spacing to Flutter's `viewInsets`, so a Scaffold with `resizeToAvoidBottomInset: true` (the default) double-compensated. On `^6.0.1` the composer clamps to `viewInsets`, so `true` is correct and does NOT double-compensate.
212
- - **Fix**: **Upgrade `cometchat_chat_uikit` to `^6.0.1`** and keep `resizeToAvoidBottomInset: true` (or omit it — `true` is the default). Setting `false` is only a stopgap on old kits you can't upgrade.
213
-
214
- ```dart
215
- // ✅ CORRECT on ^6.0.1 — true (or omit; true is the default). Composer clamps
216
- // to viewInsets (ENG-34434), so no double-compensation.
217
- Scaffold(
218
- resizeToAvoidBottomInset: true,
219
- body: Column(
220
- children: [
221
- Expanded(child: CometChatMessageList(user: user)),
222
- CometChatMessageComposer(user: user),
223
- ],
224
- ),
225
- )
226
-
227
- // ⚠ PRE-6.0.1 STOPGAP ONLY — false suppresses the double gap on kits that
228
- // predate the ENG-34434 clamp. Prefer upgrading the kit.
229
- Scaffold(
230
- resizeToAvoidBottomInset: false,
231
- body: Column(
232
- children: [
233
- Expanded(child: CometChatMessageList(user: user)),
234
- CometChatMessageComposer(user: user),
235
- ],
236
- ),
237
- )
238
- ```
239
-
240
- This applies everywhere the composer is used: messages screen, thread screen, or any custom screen.
241
-
242
- ### 3.2 Stale user/group data
243
-
244
- - **Symptom**: User name, avatar, or group info doesn't update in real-time. Old data persists even after changes.
245
- - **Cause**: Passing `widget.user` or `widget.group` directly to UIKit components instead of maintaining mutable state that updates from listeners.
246
- - **Fix**: Keep mutable `_user`/`_group` in your State class and update from SDK listeners:
247
-
248
- ```dart
249
- class _MessagesScreenState extends State<MessagesScreen> {
250
- late User? _user;
251
- late Group? _group;
252
-
253
- @override
254
- void initState() {
255
- super.initState();
256
- _user = widget.user;
257
- _group = widget.group;
258
- // Register listeners to update _user/_group on changes
259
- }
260
-
261
- @override
262
- Widget build(BuildContext context) {
263
- return Scaffold(
264
- resizeToAvoidBottomInset: true, // ^6.0.1: composer clamps to viewInsets (ENG-34434)
265
- body: Column(
266
- children: [
267
- Expanded(child: CometChatMessageList(user: _user, group: _group)),
268
- CometChatMessageComposer(user: _user, group: _group),
269
- ],
270
- ),
271
- );
272
- }
273
- }
274
- ```
275
-
276
- ### 3.3 No typing indicators / presence events
277
-
278
- - **Symptom**: Online/offline status never updates. Typing indicators don't appear. No presence events fire. No error is thrown.
279
- - **Cause**: `subscriptionType` was not set in `UIKitSettingsBuilder`. Omitting it silently disables all presence events.
280
- - **Fix**: Always set `subscriptionType`:
281
-
282
- ```dart
283
- // ✅ CORRECT
284
- UIKitSettingsBuilder()
285
- ..appId = 'APP_ID'
286
- ..region = 'us'
287
- ..authKey = 'AUTH_KEY'
288
- ..subscriptionType = CometChatSubscriptionType.allUsers
289
-
290
- // ❌ WRONG — no error, but presence events never fire
291
- UIKitSettingsBuilder()
292
- ..appId = 'APP_ID'
293
- ..region = 'us'
294
- ..authKey = 'AUTH_KEY'
295
- // subscriptionType missing!
296
- ```
297
-
298
- ### 3.4 Messages not updating in real-time
299
-
300
- - **Symptom**: New messages don't appear until the screen is refreshed or re-opened.
301
- - **Cause**: Multiple possible causes:
302
- 1. SDK message listener not registered (BLoC handles this automatically — check component is mounted)
303
- 2. `subscriptionType` not set (see 3.3)
304
- 3. Component was disposed and listener removed
305
- - **Fix**:
306
- 1. Ensure `subscriptionType` is set in UIKitSettings
307
- 2. Verify the `CometChatMessageList` widget is mounted and not disposed
308
- 3. If using custom BLoC, ensure it registers `CometChat.addMessageListener()` in its constructor and removes it in `close()`
309
-
310
- ### 3.5 Theme jank during keyboard animation
311
-
312
- - **Symptom**: Visible jank (stuttering, dropped frames) when the keyboard opens or closes, especially on message screens.
313
- - **Cause**: Theme values (`CometChatThemeHelper.getColorPalette(context)`, etc.) are being looked up inside `build()`. During keyboard animation, `MediaQuery` changes trigger rebuilds, and each lookup does expensive InheritedWidget traversal (44–95ms instead of <16ms).
314
- - **Fix**: Cache theme values in `didChangeDependencies()` with a `_themeInitialized` flag:
315
-
316
- ```dart
317
- // ✅ CORRECT — cache once, reuse on every build
318
- class _MyWidgetState extends State<MyWidget> {
319
- late CometChatColorPalette _colorPalette;
320
- late CometChatSpacing _spacing;
321
- late CometChatTypography _typography;
322
- bool _themeInitialized = false;
323
-
324
- @override
325
- void didChangeDependencies() {
326
- super.didChangeDependencies();
327
- if (!_themeInitialized) {
328
- _colorPalette = CometChatThemeHelper.getColorPalette(context);
329
- _spacing = CometChatThemeHelper.getSpacing(context);
330
- _typography = CometChatThemeHelper.getTypography(context);
331
- _themeInitialized = true;
332
- }
333
- }
334
-
335
- @override
336
- Widget build(BuildContext context) {
337
- // Use _colorPalette, _spacing, _typography — no lookups here
338
- return Container(color: _colorPalette.primary);
339
- }
340
- }
341
-
342
- // ❌ WRONG — lookup in build causes jank during keyboard animation
343
- @override
344
- Widget build(BuildContext context) {
345
- final colors = CometChatThemeHelper.getColorPalette(context); // Expensive!
346
- return Container(color: colors.primary);
347
- }
348
- ```
349
-
350
- ### 3.6 Extra white space between composer and keyboard
351
-
352
- - **Symptom**: Visible gap between the message composer and the keyboard when it opens.
353
- - **Cause**: Safe area bottom padding being applied when the keyboard is open. The keyboard already covers the safe area, so adding safe area padding on top creates extra space.
354
- - **Fix**: Cache `MediaQuery.paddingOf(context).bottom` once in `didChangeDependencies()`. Never wrap the composer in an extra `SafeArea` widget — `CometChatMessageComposer` already handles bottom inset internally via `SliverSpacing`:
355
-
356
- ```dart
357
- // ✅ CORRECT — cache safe area once, no extra SafeArea wrapper
358
- class _MessagesScreenState extends State<MessagesScreen> {
359
- double _bottomSafeArea = 0;
360
-
361
- @override
362
- void didChangeDependencies() {
363
- super.didChangeDependencies();
364
- _bottomSafeArea = MediaQuery.paddingOf(context).bottom;
365
- }
366
-
367
- @override
368
- Widget build(BuildContext context) {
369
- return Scaffold(
370
- resizeToAvoidBottomInset: true, // ^6.0.1: composer clamps to viewInsets (ENG-34434)
371
- body: Column(
372
- children: [
373
- Expanded(child: CometChatMessageList(user: widget.user)),
374
- CometChatMessageComposer(user: widget.user), // No SafeArea wrapper!
375
- ],
376
- ),
377
- );
378
- }
379
- }
380
-
381
- // ❌ WRONG — SafeArea wrapper adds bottom padding the composer already handles
382
- Scaffold(
383
- resizeToAvoidBottomInset: true,
384
- body: Column(
385
- children: [
386
- Expanded(child: CometChatMessageList(user: widget.user)),
387
- SafeArea( // ← Causes extra white gap when keyboard opens
388
- child: CometChatMessageComposer(user: widget.user),
389
- ),
390
- ],
391
- ),
392
- )
393
- ```
394
-
395
- ---
396
-
397
- ## 4. Call Issues
398
-
399
- ### 4.1 "auth token null" on call init
400
-
401
- - **Symptom**: Calls SDK fails with `auth token null` or similar authentication error when trying to start a call.
402
- - **Cause**: The Calls SDK was initialized before the Chat SDK completed init and login. The Calls SDK needs the auth token from a successful chat login (rule **CALLS_INIT_AFTER_CHAT_INIT** — see `cometchat-flutter-v6-calls` §1.0).
403
- - **Fix**: When `..enableCalls = true` is set on `UIKitSettingsBuilder`, `CallEventService` handles both `CometChatUIKitCalls.init()` and `CometChatUIKitCalls.loginWithAuthToken()` internally — chat init must complete first. For manual integrations, gate calls init on chat init success:
404
-
405
- ```dart
406
- // ✅ CORRECT — chat init first, calls init in onSuccess
407
- await CometChatUIKit.init(
408
- uiKitSettings: settings,
409
- onSuccess: (_) async {
410
- // For manual calls integration (no ..enableCalls = true):
411
- // CometChatUIKitCalls.init takes raw appId + region STRINGS (not a settings
412
- // builder) and reports via callbacks — verified vs cometchat_uikit_calls.dart:9.
413
- CometChatUIKitCalls.init(
414
- 'APP_ID',
415
- 'us',
416
- onSuccess: (_) {},
417
- onError: (e) => debugPrint('Calls init failed: $e'),
418
- );
419
- },
420
- onError: (e) => debugPrint('Chat init failed: ${e.message}'),
421
- );
422
-
423
- // ❌ WRONG — calls init runs before chat init completes
424
- CometChatUIKit.init(uiKitSettings: settings); // not awaited
425
- await CometChatUIKitCalls.init(callAppSettings); // auth token null
426
- ```
427
-
428
- ### 4.2 "session already started"
429
-
430
- - **Symptom**: Error `session already started` when trying to join or start a call.
431
- - **Cause**: Two distinct causes — diagnose both:
432
- 1. **Duplicate `CometChatUIKitCalls.init()` within one app lifecycle.** The Calls SDK is single-init (rule **CALL_INIT_ONCE** — see `cometchat-flutter-v6-calls`). Calling init more than once (e.g., from multiple bootstrap paths, hot-restart with stale state) emits this error.
433
- 2. **Stale call session from a prior call** that was not ended cleanly — user navigated away without hanging up, or the app was killed mid-call.
434
- - **Fix**:
435
-
436
- ```dart
437
- // ✅ CAUSE (a) — single-init guard at app boot
438
- bool _callsInitDone = false;
439
- Future<void> initCallsOnce(CallAppSettings settings) async {
440
- if (_callsInitDone) return;
441
- await CometChatUIKitCalls.init(settings);
442
- _callsInitDone = true;
443
- }
444
-
445
- // ✅ CAUSE (b) — clean up the stale session via the UIKit-namespaced API.
446
- // The method is endSession (NOT endCall) and takes named callbacks, no sessionId
447
- // — verified vs cometchat_uikit_calls.dart:236.
448
- await CometChatUIKitCalls.endSession(
449
- onSuccess: (_) {},
450
- onError: (e) => debugPrint('endSession failed: $e'),
451
- );
452
-
453
- // ❌ WRONG — bare CometChat.endCall is the Chat SDK API, not the calls cleanup
454
- CometChat.endCall(sessionId, onSuccess: ..., onError: ...);
455
- ```
456
-
457
- ### 4.3 "CallManager not found" / "Calling module not found"
458
-
459
- - **Symptom**: Android native error `CallManager not found` or `CometChat Calling module not found`.
460
- - **Cause**: The CometChat Calling native module is not properly linked on Android. This can happen with ProGuard stripping, missing dependencies, or build configuration issues.
461
- - **Fix**:
462
- 1. Ensure ProGuard keep rules are in place (see Section 6.1)
463
- 2. Verify `cometchat_chat_uikit` is properly added to `pubspec.yaml`
464
- 3. Run `flutter clean` and rebuild
465
- 4. Check that `android.enableJetifier=true` is in `gradle.properties`
466
-
467
- ### 4.4 "startSession null" on Android
468
-
469
- - **Symptom**: `startSession` returns null on Android with no error feedback. The call screen may appear blank or stuck.
470
- - **Cause**: Known Android SDK issue where `startSession` silently fails. A 5-second timeout workaround exists but provides no error feedback.
471
- - **Fix**: This is a known SDK-level issue. Workarounds:
472
- 1. Implement a timeout wrapper around `startSession` calls
473
- 2. Show a retry option to the user if the call screen doesn't load within 5 seconds
474
- 3. Check for updates to `cometchat_calls_sdk` that may fix this
475
-
476
- ### 4.5 Incoming call not received
477
-
478
- - **Symptom**: Incoming calls are not shown to the receiver. The caller sees the outgoing call screen but the receiver gets nothing.
479
- - **Cause**: Multiple possible causes:
480
- 1. `subscriptionType` not set (presence/events disabled)
481
- 2. Push notification / VoIP setup incomplete
482
- 3. Call listeners not registered
483
- 4. App is in background without proper background handling
484
- - **Fix**:
485
- 1. Ensure `subscriptionType` is set to `CometChatSubscriptionType.allUsers`
486
- 2. Verify FCM/APNs push notification setup for background calls
487
- 3. Check that call event listeners are registered
488
- 4. For cross-platform issues (Android↔iOS↔React), verify all platforms are on compatible SDK versions
489
-
490
- ### 4.6 Calls SDK not re-initialized after logout
491
-
492
- - **Symptom**: After logout and re-login, calls don't work. Call screens may be blank or throw errors.
493
- - **Cause**: The Calls SDK maintains its own session state. After `CometChatUIKit.logout()`, the Calls SDK session is invalidated but may not be properly re-initialized on the next login.
494
- - **Fix**: Ensure the Calls SDK is re-initialized after login. The UIKit handles this internally — if you're managing calls manually, call the Calls SDK init after each successful login.
495
-
496
- ### 4.7 Outgoing call screen never renders / app shows nothing after tapping call (V6 navigatorKey trap)
497
-
498
- - **Symptom**: Caller taps the call button. The peer rings (server received the call). The caller's Flutter app shows **nothing** — no outgoing-call screen, no error in `onSuccess`/`onError`. `CometChat.initiateCall` returns successfully with a valid `sessionId`, but no UI ever appears.
499
- - **Cause**: `MaterialApp` is missing `navigatorKey: CallNavigationContext.navigatorKey`. The kit's `CometChatCallButtons` and outgoing-call flow navigate via `CallNavigationContext.navigatorKey.currentContext` — which is `null` until the app's `MaterialApp` is wired to that key. The failure is silent because `initiateCall` itself succeeds; only the *navigation* to the outgoing-call screen fails. **Important**: the vendor's own 6.0.1 sample app is missing this line, so customers who copied `main.dart` verbatim will hit this bug. This is the single most common customer-blocking V6 calls trap.
500
- - **Fix**: Wire `CallNavigationContext.navigatorKey` on the root `MaterialApp`:
501
-
502
- ```dart
503
- // ✅ CORRECT — navigatorKey wired on MaterialApp
504
- import 'package:flutter/material.dart';
505
- import 'package:cometchat_chat_uikit/cometchat_calls_uikit.dart'
506
- show CallNavigationContext; // calls is a sub-library of cometchat_chat_uikit — there is NO separate cometchat_calls_uikit package in v6
507
-
508
- class MyApp extends StatelessWidget {
509
- @override
510
- Widget build(BuildContext context) {
511
- return MaterialApp(
512
- navigatorKey: CallNavigationContext.navigatorKey, // REQUIRED for V6 calls
513
- home: const HomeScreen(),
514
- );
515
- }
516
- }
517
-
518
- // ❌ WRONG — no navigatorKey; outgoing-call screen never appears
519
- return MaterialApp(
520
- home: const HomeScreen(),
521
- );
522
- ```
20
+ ## Prerequisites & install
21
+ None — diagnosis only.
523
22
 
524
- See `cometchat-flutter-v6-calls` §1.7 for the canonical wiring rule.
525
-
526
- ### 4.8 Stuck on "Calling…" after peer accepts (v6.0.0-beta2 BLoC bug fixed in 6.0.1)
527
-
528
- - **Symptom**: Outgoing call screen displays correctly, peer accepts the call, but the caller's screen stays stuck on "Calling…" and never transitions to the in-call surface. Audio/video may already be flowing in the background; only the UI state is wrong.
529
- - **Cause**: A known BLoC transition bug in `cometchat_chat_uikit ^6.0.0-beta2` where the outgoing → in-call state never fires. **This is FIXED in 6.0.1 GA.**
530
- - **Fix**: Upgrade to `cometchat_chat_uikit ^6.0.1` (or the latest 6.x):
531
-
532
- ```yaml
533
- # pubspec.yaml
534
- dependencies:
535
- cometchat_chat_uikit: ^6.0.1 # was ^6.0.0-beta2
536
- ```
537
-
538
- Then run:
539
-
540
- ```bash
541
- flutter pub get
542
- flutter clean
543
- flutter run
544
- ```
545
-
546
- If the bug persists after upgrade, verify Section 4.7 (`navigatorKey` is still required on 6.0.1).
547
-
548
- ---
549
-
550
- ## 5. Listener Issues
551
-
552
- ### 5.1 Duplicate events (hardcoded listener IDs)
553
-
554
- - **Symptom**: Event handlers fire multiple times for a single event. Messages appear twice, typing indicators flicker.
555
- - **Cause**: Listener registered with a hardcoded ID. When the widget is recreated (e.g., navigation), the new listener overwrites the old one but the old widget's handler may still be referenced, or multiple instances collide.
556
- - **Fix**: Use a unique listener ID per widget instance:
557
-
558
- ```dart
559
- // ✅ CORRECT — unique ID per instance
560
- class _MyScreenState extends State<MyScreen> with MessageListener {
561
- late final String _listenerId;
562
-
563
- @override
564
- void initState() {
565
- super.initState();
566
- _listenerId = 'my_screen_${DateTime.now().millisecondsSinceEpoch}';
567
- CometChat.addMessageListener(_listenerId, this);
568
- }
569
-
570
- @override
571
- void dispose() {
572
- CometChat.removeMessageListener(_listenerId);
573
- super.dispose();
574
- }
575
- }
576
-
577
- // ❌ WRONG — hardcoded ID causes collisions across instances
578
- CometChat.addMessageListener('messages', this); // Collision!
579
- ```
580
-
581
- ### 5.2 Listener leaks (missing dispose)
582
-
583
- - **Symptom**: Memory usage grows over time. Events fire on screens that are no longer visible. App becomes sluggish.
584
- - **Cause**: SDK listeners registered in `initState()` but not removed in `dispose()`.
585
- - **Fix**: Always remove listeners with the same ID used to register:
586
-
587
- ```dart
588
- @override
589
- void dispose() {
590
- CometChat.removeMessageListener(_listenerId);
591
- CometChat.removeUserListener(_listenerId);
592
- CometChat.removeGroupListener(_listenerId);
593
- CometChat.removeCallListener(_listenerId);
594
- super.dispose();
595
- }
596
- ```
597
-
598
- ### 5.3 No events firing (subscriptionType not set)
599
-
600
- - **Symptom**: All listeners are properly registered and removed, but no events ever fire. No errors in console.
601
- - **Cause**: `subscriptionType` not set in `UIKitSettingsBuilder`. This silently disables all real-time events.
602
- - **Fix**: Set `subscriptionType` during init:
603
-
604
- ```dart
605
- UIKitSettingsBuilder()
606
- ..subscriptionType = CometChatSubscriptionType.allUsers
607
- ```
608
-
609
- ---
610
-
611
- ## 6. Build Errors
612
-
613
- ### 6.0 `pub get` can't resolve `cometchat_chat_uikit` ^6.x / resolves a beta
614
-
615
- - **Symptom**: `flutter pub get` fails to find `cometchat_chat_uikit ^6.0.x`, or pulls a `6.0.0-beta` instead of the GA.
616
- - **Cause**: Wrong package source. **The v6 GA is on pub.dev**; Cloudsmith hosts only the beta + legacy V5.
617
- - **Fix**: Use the default pub.dev source — `dependencies: cometchat_chat_uikit: ^6.0.2` (no `hosted:` block). Only add the Cloudsmith `hosted:` URL if you are intentionally on a beta/V5. (V6 calls fold into this one package — there is no separate `cometchat_calls_uikit` package on v6; calls types come from the `package:cometchat_chat_uikit/cometchat_calls_uikit.dart` sub-library.)
618
-
619
- ### 6.05 Push token never registers / looking for `PNRegistry`
620
-
621
- - **Symptom**: Push notifications never arrive; code references a `PNRegistry` class that won't import.
622
- - **Cause**: `PNRegistry` is **not** a kit/SDK symbol — it's a copy-in **V5 sample-app extension** (`extension PNRegistry on CometChatService`), not exported by any `cometchat_*` package.
623
- - **Fix**: The real push API is `CometChatNotifications.registerPushToken(PushPlatforms.FCM_FLUTTER_ANDROID, fcmToken: token, providerId: ...)` (+ `FCM_FLUTTER_IOS` / `APNS_FLUTTER_DEVICE` / `APNS_FLUTTER_VOIP`) — call it AFTER login, and `unregisterPushToken(...)` on logout. See `cometchat-flutter-v6-push`.
624
-
625
- ### 6.1 Android: ClassNotFoundException (missing ProGuard rules)
626
-
627
- - **Symptom**: Release build crashes with `ClassNotFoundException` for CometChat classes. Debug builds work fine.
628
- - **Cause**: R8/ProGuard strips CometChat SDK classes during release minification.
629
- - **Fix**: Create `android/app/proguard-rules.pro` with:
630
-
631
- ```
632
- # CometChat — prevent R8 from stripping SDK classes
633
- -keep class com.cometchat.** { *; }
634
- -keep interface com.cometchat.** { *; }
635
-
636
- # Suppress warnings for Calls SDK classes referenced cross-module
637
- -dontwarn com.cometchat.calls.CometChatRTCView$CometChatRTCViewBuilder
638
- -dontwarn com.cometchat.calls.CometChatRTCView
639
- -dontwarn com.cometchat.calls.CometChatRTCViewListener
640
- -dontwarn com.cometchat.calls.model.AnalyticsSettings
641
- -dontwarn com.cometchat.calls.model.RTCCallback
642
- -dontwarn com.cometchat.calls.model.RTCReceiver
643
- ```
644
-
645
- Reference it in `android/app/build.gradle`:
646
-
647
- ```kotlin
648
- buildTypes {
649
- release {
650
- isMinifyEnabled = true
651
- isShrinkResources = true
652
- proguardFiles(
653
- getDefaultProguardFile("proguard-android-optimize.txt"),
654
- "proguard-rules.pro"
655
- )
656
- }
657
- }
658
- ```
659
-
660
- ### 6.2 Android: minSdk too low
661
-
662
- - **Symptom**: Build fails with error about minimum SDK version. Error mentions `minSdkVersion` incompatibility.
663
- - **Cause**: `minSdk` is set below 26. The `cometchat_calls_sdk` requires minSdk 26.
664
- - **Fix**: In `android/app/build.gradle` (or `.kts`):
665
-
666
- ```kotlin
667
- defaultConfig {
668
- minSdk = 26 // Required by cometchat_calls_sdk
669
- }
670
- ```
671
-
672
- ### 6.3 Android: Jetifier missing
673
-
674
- - **Symptom**: Build fails with errors about Android Support Library classes not found, or `androidx` conflicts.
675
- - **Cause**: `android.enableJetifier=true` not set. Transitive dependencies from the CometChat SDK use old Android Support Library references.
676
- - **Fix**: In `android/gradle.properties`:
677
-
678
- ```properties
679
- android.useAndroidX=true
680
- android.enableJetifier=true
681
- ```
682
-
683
- ### 6.4 iOS: pod install failures
684
-
685
- - **Symptom**: `pod install` fails with dependency resolution errors, version conflicts, or missing pods.
686
- - **Cause**: Cocoapods cache is stale, or the Podfile needs updating.
687
- - **Fix**:
688
-
689
- ```bash
690
- cd ios
691
- rm -rf Pods Podfile.lock
692
- pod repo update
693
- pod install --repo-update
694
- cd ..
695
- flutter clean
696
- flutter pub get
697
- ```
698
-
699
- If still failing, check that the iOS deployment target in `ios/Podfile` is high enough:
700
-
701
- ```ruby
702
- platform :ios, '13.0' # Minimum for CometChat
703
- ```
704
-
705
- ### 6.5 iOS: missing permissions
706
-
707
- - **Symptom**: App crashes or shows blank screen when trying to access camera, microphone, or photo library on iOS.
708
- - **Cause**: Required permission descriptions missing from `Info.plist`.
709
- - **Fix**: Add to `ios/Runner/Info.plist`:
710
-
711
- ```xml
712
- <key>NSCameraUsageDescription</key>
713
- <string>Camera access is needed for video calls and sending photos</string>
714
- <key>NSMicrophoneUsageDescription</key>
715
- <string>Microphone access is needed for voice and video calls</string>
716
- <key>NSPhotoLibraryUsageDescription</key>
717
- <string>Photo library access is needed for sending images</string>
718
- ```
719
-
720
- For VoIP calls, also add:
721
-
722
- ```xml
723
- <key>UIBackgroundModes</key>
724
- <array>
725
- <string>voip</string>
726
- <string>remote-notification</string>
727
- </array>
728
- ```
729
-
730
- ### 6.6 Android: KGP "legacy plugin application" warning (benign)
731
-
732
- - **Symptom**: `flutter build apk` / `flutter run` prints a warning that the CometChat plugins apply the Kotlin Gradle Plugin the legacy way (e.g. *"The Kotlin Gradle plugin was loaded multiple times…"* / legacy-plugin-application deprecation from both `cometchat_chat_uikit` and `cometchat_calls_sdk`).
733
- - **Cause**: kit-side — the plugins haven't migrated to the declarative `plugins {}` KGP application. It's emitted by the kit, not your project.
734
- - **Fix**: **None needed — this is a warning, not an error.** The build still succeeds (verified — real `flutter build apk --debug`). Don't try to "fix" it in your app; it clears when the kit updates its Gradle plugin wiring.
735
-
736
- ---
737
-
738
- ## 7. Performance Issues
739
-
740
- ### 7.1 Theme lookup in build() causing jank
741
-
742
- - **Symptom**: Dropped frames during scrolling or keyboard animation. Flutter DevTools shows long build times (44–95ms).
743
- - **Cause**: `CometChatThemeHelper.getColorPalette(context)` and similar calls in `build()` do expensive InheritedWidget traversal on every rebuild.
744
- - **Fix**: Cache theme values in `didChangeDependencies()` — see Section 3.5 for the full pattern. For child widgets, pass pre-cached theme values from the parent:
745
-
746
- ```dart
747
- // Parent passes cached values to children
748
- CometChatImageBubble(
749
- imageUrl: message.attachment?.fileUrl,
750
- colorPalette: _colorPalette, // Pre-cached from parent
751
- spacing: _spacing, // Pre-cached from parent
752
- );
753
- ```
754
-
755
- ### 7.2 Missing buildWhen optimization
756
-
757
- - **Symptom**: Entire widget tree rebuilds on every BLoC state change, even when only a small part of the state changed.
758
- - **Cause**: `BlocConsumer` or `BlocBuilder` without `buildWhen` — rebuilds on every state emission.
759
- - **Fix**: Add `buildWhen` to limit rebuilds to relevant state changes:
760
-
761
- ```dart
762
- BlocConsumer<MessageComposerBloc, MessageComposerState>(
763
- buildWhen: (previous, current) =>
764
- previous.isEditMode != current.isEditMode ||
765
- previous.isReplyMode != current.isReplyMode ||
766
- previous.isRecordingMode != current.isRecordingMode ||
767
- previous.editMessage != current.editMessage ||
768
- previous.replyMessage != current.replyMessage,
769
- listener: (context, state) { /* still receives ALL state changes */ },
770
- builder: (context, state) { /* only rebuilds when buildWhen is true */ },
771
- )
772
- ```
773
-
774
- ### 7.3 O(n) lookups instead of O(1)
775
-
776
- - **Symptom**: Slow scrolling in long message lists. `findChildIndexCallback` takes too long.
777
- - **Cause**: Using `list.indexWhere()` (O(n)) to find messages instead of a Map-based O(1) lookup.
778
- - **Fix**: Maintain a `Map<int, int>` alongside the message list for O(1) index lookups:
779
-
780
- ```dart
781
- // In BLoC — maintain O(1) lookup map
782
- final Map<int, int> _messageIndexMap = {};
783
-
784
- int? findMessageIndex(int messageId) => _messageIndexMap[messageId];
785
-
786
- // In SliverAnimatedList
787
- SliverAnimatedList(
788
- findChildIndexCallback: (Key key) {
789
- if (key is ValueKey<int>) {
790
- final index = widget.findMessageIndex?.call(key.value) ??
791
- _messages.indexWhere((m) => m.id == key.value);
792
- if (index != -1) return visualPosition(index);
793
- }
794
- return null;
795
- },
796
- )
797
- ```
798
-
799
- ---
800
-
801
- ## 8. Platform-Specific Issues
802
-
803
- ### 8.1 Android-specific
23
+ ## Triage in order (cheapest first)
24
+ 1. **Does `flutter analyze` pass?** A stale v5 symbol or a wrong barrel import is a compile error, not a runtime mystery.
25
+ 2. **Did `init` AND `login` both reach `onSuccess`?** Log both. Most "blank chat" reports stop here.
26
+ 3. **Is the failing widget inside a bounded box?** The second-most-common cause, and it is always the host's container.
27
+ 4. **Is the thing you expect actually enabled** Dashboard toggle (extensions, moderation), `uiKit.enableCalling`, a push provider?
28
+ 5. Only then look at the kit.
804
29
 
30
+ ## Symptom → cause → fix
805
31
  | Symptom | Cause | Fix |
806
- |---------|-------|-----|
807
- | Release crash `ClassNotFoundException` | Missing ProGuard rules | Add `-keep class com.cometchat.** { *; }` see Section 6.1 |
808
- | Build fail `minSdk` | minSdk < 26 | Set `minSdk = 26` in `build.gradle` |
809
- | Build fail support library | Missing Jetifier | Add `android.enableJetifier=true` to `gradle.properties` |
810
- | `startSession` returns null | Known Calls SDK issue | Implement timeout + retry see Section 4.4 |
811
- | `CallManager not found` | Native module not linked | Clean build + verify ProGuard + Jetifier — see Section 4.3 |
812
- | Audio recording stuck after permission | Permission callback race | Ensure permission is granted before starting recording; handle the permission result callback properly |
813
-
814
- ### 8.2 iOS-specific
815
-
816
- | Symptom | Cause | Fix |
817
- |---------|-------|-----|
818
- | Pod install fails | Stale cache or version conflict | `rm -rf Pods Podfile.lock && pod install --repo-update` |
819
- | Camera/mic crash | Missing `Info.plist` permissions | Add `NSCameraUsageDescription`, `NSMicrophoneUsageDescription` see Section 6.5 |
820
- | Media not sending | File access or permission issue | Verify `NSPhotoLibraryUsageDescription` in Info.plist; check file picker permissions |
821
- | App crash on iPhone 11 | Device-specific compatibility | Check iOS deployment target 13.0; verify no 32-bit dependencies |
822
- | VoIP calls not received in background | Missing background modes | Add `voip` and `remote-notification` to `UIBackgroundModes` in Info.plist |
823
-
824
- ### 8.3 Web-specific
825
-
826
- | Symptom | Cause | Fix |
827
- |---------|-------|-----|
828
- | Runtime error on web | Platform-specific code without `kIsWeb` guard | Wrap platform-specific code with `if (!kIsWeb)` checks |
829
- | Native plugins crash on web | Plugin not available on web | Use conditional imports or `kIsWeb` guards before calling native APIs |
830
- | CORS errors | API calls blocked by browser | Ensure CometChat API endpoints are accessible; check proxy configuration |
831
-
832
- ```dart
833
- // ✅ CORRECT — guard platform-specific code
834
- import 'package:flutter/foundation.dart' show kIsWeb;
835
-
836
- if (!kIsWeb) {
837
- // Native-only code (e.g., push notifications, file system access)
838
- setupPushNotifications();
839
- }
840
-
841
- // For conditional imports:
842
- // lib/platform/native_service.dart — native implementation
843
- // lib/platform/web_service.dart — web implementation
844
- ```
845
-
846
- ---
847
-
848
- ## Quick Reference: Error → Fix Table
849
-
850
- | Error / Symptom | Section | One-Line Fix |
851
- |----------------|---------|-------------|
852
- | "Authentication null" | 2.1 | Call `CometChatUIKit.init()` before any usage |
853
- | "APP ID null" | 2.2 | Set `..appId = 'YOUR_APP_ID'` in UIKitSettingsBuilder |
854
- | ERR_ALREADY_LOGGED_IN | 2.3 | Check `CometChatUIKit.loggedInUser` before calling login |
855
- | "Android internal error" | 2.4 | Verify credentials, UID existence, try stable SDK |
856
- | Guard screen stuck on spinner | 2.5 | Use `CometChatUIKit.loggedInUser` synchronously after init |
857
- | ERR_INVALID_REGION | 2.6 | Use lowercase: `'us'`, `'eu'`, `'in'` |
858
- | StateError: not initialized | 2.7 | Call `ServiceLocator.instance.setup()` before creating BLoC |
859
- | Double keyboard compensation (pre-6.0.1) | 3.1 | Upgrade kit to `^6.0.1` (composer clamps to `viewInsets`, ENG-34434); keep `resizeToAvoidBottomInset: true`. `false` is only an old-kit stopgap |
860
- | No typing indicators / presence | 3.3 | Set `..subscriptionType = CometChatSubscriptionType.allUsers` |
861
- | Theme jank during keyboard | 3.5 | Cache theme in `didChangeDependencies()`, not `build()` |
862
- | Outgoing call screen never appears | 4.7 | Wire `navigatorKey: CallNavigationContext.navigatorKey` on `MaterialApp` |
863
- | Stuck on "Calling…" after peer accepts | 4.8 | Upgrade `cometchat_chat_uikit` from `^6.0.0-beta2` to `^6.0.1` |
864
- | Duplicate events | 5.1 | Use unique listener ID per widget instance |
865
- | Listener leak | 5.2 | Remove listener in `dispose()` with same ID |
866
- | ClassNotFoundException (release) | 6.1 | Add ProGuard keep rules for `com.cometchat.**` |
867
- | minSdk too low | 6.2 | Set `minSdk = 26` |
868
- | Jetifier missing | 6.3 | Add `android.enableJetifier=true` |
869
- | Pod install failure | 6.4 | Delete Pods + Podfile.lock, `pod install --repo-update` |
870
- | Missing iOS permissions | 6.5 | Add camera/mic/photo descriptions to Info.plist |
871
-
872
- ---
873
-
874
- ## Checklist — Every CometChat Integration
875
-
876
- Use this checklist to verify your integration is correct:
877
-
878
- - [ ] `CometChatUIKit.init()` called and awaited before any usage
879
- - [ ] Auth check uses `CometChatUIKit.loggedInUser` after init (not `CometChat.getLoggedInUser()`)
880
- - [ ] `subscriptionType` set in UIKitSettingsBuilder
881
- - [ ] `region` is lowercase (`'us'`, `'eu'`, `'in'`)
882
- - [ ] Scaffold hosting `CometChatMessageComposer` uses `resizeToAvoidBottomInset: true` (or omits it) on `^6.0.1` — composer clamps to `viewInsets` (ENG-34434); `false` is only the pre-6.0.1 stopgap
883
- - [ ] Theme cached in `didChangeDependencies()`, not `build()`
884
- - [ ] SDK listeners registered with unique ID, removed in `dispose()`
885
- - [ ] Colors from `CometChatThemeHelper`, never hardcoded
886
- - [ ] Strings from `Translations.of(context)`, never hardcoded
887
- - [ ] If using calls: `MaterialApp` wires `navigatorKey: CallNavigationContext.navigatorKey` (required for V6 calls, including 6.0.1)
888
- - [ ] If using calls on 6.0.0-beta2: upgrade to `cometchat_chat_uikit ^6.0.1` (fixes outgoing → in-call BLoC transition)
889
- - [ ] Android: minSdk ≥ 26, Jetifier enabled, ProGuard rules added
890
- - [ ] iOS: permissions in Info.plist, deployment target ≥ 13.0
891
- - [ ] Web: `kIsWeb` guards on platform-specific code
32
+ |---|---|---|
33
+ | Blank/white chat screen | A widget built before `login` resolved | Gate the first frame on init **and** login (`lifecycle.md`) |
34
+ | `Unable to load asset: cometchat-settings.json` | Not at project root, or not registered | Add under `flutter: assets:`, re-run `flutter pub get` |
35
+ | Crash on startup before any UI | `WidgetsFlutterBinding.ensureInitialized()` missing | Call it first in `main()` `initFromSettings` reads an asset |
36
+ | `RenderFlex unbounded height` | A kit list in an unbounded parent | `Expanded`/`Flexible`, or a fixed height (`layout.md`) |
37
+ | List renders as a zero-height sliver | Same content-driven parent | Same |
38
+ | Composer hidden by the keyboard | `resizeToAvoidBottomInset: false`, or nested `Scaffold`s | Leave the default `true`; one `Scaffold` per screen |
39
+ | Header under the notch | No `SafeArea` | Wrap the body |
40
+ | Two app bars | Your `Scaffold` `AppBar` + the widget's own | `hideAppbar: true` on the list widget |
41
+ | Login fails instantly | Wrong **Region**, or the UID doesn't exist | Match the Dashboard region exactly; use a real UID (Dashboard → Users) |
42
+ | Works in debug, fails in release | Obfuscation, or the settings asset not bundled | Test the release build; verify the asset ships |
43
+ | `Undefined name 'CometChatIncomingCall'` (any call widget) | Only the chat barrel imported | Also import `…/cometchat_calls_uikit.dart` (`-calls`) |
44
+ | Call buttons never appear | Calls not enabled on BOTH sides | `uiKit.enableCalling: true` **and** `cometchat_calls_sdk` installed |
45
+ | Call surface opens black | Camera/mic permission missing, or a simulator | Add usage strings/permissions; test on a real device |
46
+ | Incoming call never shows (calling on) | No `navigatorKey` on the root `MaterialApp` kit logs *"Incoming call overlay cannot be shown"* | `navigatorKey: CallNavigationContext.navigatorKey` (`-calls`) |
47
+ | Two incoming-call screens | Own `CallListener` + `CometChatIncomingCall` on top of the kit's `CallEventService` overlay | Remove yours the kit presents it; customize via `CallingConfiguration` |
48
+ | Thread replies never send | `parentMessageId` without `user:`/`group:` | Pass BOTH on the thread list *and* composer |
49
+ | Enabled extension doesn't appear | Expecting v5 registration | v6 auto-surfaces it; confirm the Dashboard toggle, add NO code |
50
+ | Push never arrives | No Dashboard provider, or registered before login | Configure the provider; register after login; re-register on refresh (`-push`) |
51
+ | Previous user still gets notifications | Push token never unregistered on logout | Unregister before `logout()` |
52
+ | Presence never updates | `subscribePresenceForAllUsers` false | Set it `true` in the settings file |
53
+ | Messages only arrive on reopen | Socket not auto-connecting | `chatSDK.autoEstablishSocketConnection: true` |
54
+ | Duplicate events after hot restart | Listener not removed in `dispose` | Pair every add with a remove (`-events`) |
55
+ | `The named parameter 'x' isn't defined` on a kit widget | Following a doc page that drifted | Trust the compiler; several Flutter pages had wrong signatures check `DOCS-BACKLOG.md` PART 4 |
56
+ | Android build fails on minSdk | Below the floor (the docs' 24 is too low) | `minSdk = 26` forced by `cometchat_calls_sdk`, a hard dependency of the kit |
57
+ | iOS pod install fails | Deployment target too low | `platform :ios, '15.1'` (13.0 through calls-sdk 5.0.6), then `pod install` |
58
+ | Everything broke after upgrading | Mixed majors / removed v5 APIs | → `cometchat-flutter-v6-migration`; never mix majors |
59
+
60
+ ## When the docs and the compiler disagree, the compiler wins
61
+ Several `ui-kit/flutter` pages documented parameters that do not exist in 6.1.0 (thread header, search callbacks, style names). If a documented snippet will not compile, that is a **docs** bug: use the real signature, and flag the page (`RULES.md` §20) rather than working around it forever.
62
+
63
+ ## Still stuck collect this before escalating
64
+ Kit + SDK versions from `pubspec.lock` · the `flutter analyze` output · whether `init`/`login` reached `onSuccess` · the exact exception + stack · platform and whether it is a real device · the relevant Dashboard toggles. Most escalations are resolved by the first three.
65
+
66
+ ## Verify it works
67
+ The specific symptom is gone, `flutter analyze` is clean, and the fix was to the HOST's wiring (gating, container, imports, config) — if the answer looked like "patch around the kit", re-check the table.