@cometchat/skills 4.3.0 → 4.4.1

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 (233) hide show
  1. package/LICENSE +21 -0
  2. package/bin/install.js +27 -0
  3. package/package.json +14 -1
  4. package/skills/cometchat/SKILL.md +233 -69
  5. package/skills/cometchat/references/asking-questions.md +48 -0
  6. package/skills/cometchat-a11y/SKILL.md +3 -2
  7. package/skills/cometchat-android-v5/SKILL.md +2 -1
  8. package/skills/cometchat-android-v5-calls/SKILL.md +36 -22
  9. package/skills/cometchat-android-v5-calls/references/README.md +1 -1
  10. package/skills/cometchat-android-v5-calls/references/add-calls-to-existing-chat.md +7 -5
  11. package/skills/cometchat-android-v5-calls/references/audio-controls.md +4 -4
  12. package/skills/cometchat-android-v5-calls/references/call-layouts.md +33 -25
  13. package/skills/cometchat-android-v5-calls/references/call-session.md +2 -2
  14. package/skills/cometchat-android-v5-calls/references/custom-ui.md +5 -5
  15. package/skills/cometchat-android-v5-calls/references/event-listeners.md +2 -2
  16. package/skills/cometchat-android-v5-calls/references/idle-timeout.md +20 -14
  17. package/skills/cometchat-android-v5-calls/references/in-call-chat.md +1 -1
  18. package/skills/cometchat-android-v5-calls/references/migration-v4-to-v5.md +43 -27
  19. package/skills/cometchat-android-v5-calls/references/participant-management.md +3 -3
  20. package/skills/cometchat-android-v5-calls/references/raise-hand.md +25 -19
  21. package/skills/cometchat-android-v5-calls/references/recording.md +2 -2
  22. package/skills/cometchat-android-v5-calls/references/ringing-integration.md +1 -1
  23. package/skills/cometchat-android-v5-calls/references/screen-sharing.md +5 -9
  24. package/skills/cometchat-android-v5-calls/references/session-settings.md +3 -3
  25. package/skills/cometchat-android-v5-calls/references/setup.md +1 -1
  26. package/skills/cometchat-android-v5-calls/references/share-invite.md +9 -4
  27. package/skills/cometchat-android-v5-calls/references/video-controls.md +4 -4
  28. package/skills/cometchat-android-v5-calls/references/voip-calling.md +2 -2
  29. package/skills/cometchat-android-v5-components/SKILL.md +4 -3
  30. package/skills/cometchat-android-v5-core/SKILL.md +5 -3
  31. package/skills/cometchat-android-v5-customization/SKILL.md +171 -7
  32. package/skills/cometchat-android-v5-extensions/SKILL.md +7 -4
  33. package/skills/cometchat-android-v5-features/SKILL.md +5 -4
  34. package/skills/cometchat-android-v5-placement/SKILL.md +2 -1
  35. package/skills/cometchat-android-v5-production/SKILL.md +2 -1
  36. package/skills/cometchat-android-v5-push/SKILL.md +2 -3
  37. package/skills/cometchat-android-v5-testing/SKILL.md +2 -1
  38. package/skills/cometchat-android-v5-theming/SKILL.md +2 -1
  39. package/skills/cometchat-android-v5-troubleshooting/SKILL.md +3 -2
  40. package/skills/cometchat-android-v6/SKILL.md +2 -1
  41. package/skills/cometchat-android-v6-builder-settings/SKILL.md +11 -7
  42. package/skills/cometchat-android-v6-calls/SKILL.md +79 -18
  43. package/skills/cometchat-android-v6-calls/references/advanced-features.md +87 -0
  44. package/skills/cometchat-android-v6-calls/references/call-layouts.md +24 -15
  45. package/skills/cometchat-android-v6-calls/references/call-session.md +2 -2
  46. package/skills/cometchat-android-v6-calls/references/device-management.md +17 -16
  47. package/skills/cometchat-android-v6-calls/references/idle-timeout.md +7 -4
  48. package/skills/cometchat-android-v6-calls/references/in-call-chat.md +13 -8
  49. package/skills/cometchat-android-v6-calls/references/raise-hand.md +6 -4
  50. package/skills/cometchat-android-v6-compose-components/SKILL.md +52 -29
  51. package/skills/cometchat-android-v6-compose-customization/SKILL.md +156 -1
  52. package/skills/cometchat-android-v6-compose-placement/SKILL.md +129 -40
  53. package/skills/cometchat-android-v6-compose-theming/SKILL.md +27 -1
  54. package/skills/cometchat-android-v6-core/SKILL.md +208 -28
  55. package/skills/cometchat-android-v6-events/SKILL.md +4 -1
  56. package/skills/cometchat-android-v6-extensions/SKILL.md +2 -1
  57. package/skills/cometchat-android-v6-features/SKILL.md +26 -2
  58. package/skills/cometchat-android-v6-kotlin-components/SKILL.md +31 -1
  59. package/skills/cometchat-android-v6-kotlin-customization/SKILL.md +172 -1
  60. package/skills/cometchat-android-v6-kotlin-placement/SKILL.md +20 -5
  61. package/skills/cometchat-android-v6-kotlin-theming/SKILL.md +36 -5
  62. package/skills/cometchat-android-v6-migration/SKILL.md +44 -42
  63. package/skills/cometchat-android-v6-production/SKILL.md +6 -3
  64. package/skills/cometchat-android-v6-push/SKILL.md +43 -2
  65. package/skills/cometchat-android-v6-testing/SKILL.md +11 -8
  66. package/skills/cometchat-android-v6-troubleshooting/SKILL.md +26 -5
  67. package/skills/cometchat-angular-calls/SKILL.md +256 -389
  68. package/skills/cometchat-angular-calls/references/add-calls-to-existing-chat.md +3 -2
  69. package/skills/cometchat-angular-calls/references/call-layouts.md +29 -12
  70. package/skills/cometchat-angular-calls/references/call-session.md +2 -2
  71. package/skills/cometchat-angular-calls/references/custom-ui.md +18 -10
  72. package/skills/cometchat-angular-calls/references/device-management.md +53 -34
  73. package/skills/cometchat-angular-calls/references/group-calls.md +45 -24
  74. package/skills/cometchat-angular-calls/references/idle-timeout.md +31 -15
  75. package/skills/cometchat-angular-calls/references/ngzone-and-async-callbacks.md +7 -6
  76. package/skills/cometchat-angular-calls/references/raise-hand.md +9 -4
  77. package/skills/cometchat-angular-calls/references/recording-screen-share.md +32 -39
  78. package/skills/cometchat-angular-calls/references/ringing-integration.md +3 -1
  79. package/skills/cometchat-angular-calls/references/share-invite.md +11 -5
  80. package/skills/cometchat-angular-calls/references/virtual-background.md +29 -0
  81. package/skills/cometchat-angular-components/SKILL.md +149 -620
  82. package/skills/cometchat-angular-core/SKILL.md +232 -312
  83. package/skills/cometchat-angular-customization/SKILL.md +415 -223
  84. package/skills/cometchat-angular-features/SKILL.md +216 -334
  85. package/skills/cometchat-angular-patterns/SKILL.md +168 -359
  86. package/skills/cometchat-angular-placement/SKILL.md +189 -560
  87. package/skills/cometchat-angular-production/SKILL.md +241 -92
  88. package/skills/cometchat-angular-push/SKILL.md +280 -294
  89. package/skills/cometchat-angular-testing/SKILL.md +430 -158
  90. package/skills/cometchat-angular-theming/SKILL.md +190 -265
  91. package/skills/cometchat-angular-troubleshooting/SKILL.md +192 -157
  92. package/skills/cometchat-astro-patterns/SKILL.md +3 -2
  93. package/skills/cometchat-calls/SKILL.md +25 -19
  94. package/skills/cometchat-calls/references/use-case-broadcast.md +15 -10
  95. package/skills/cometchat-calls/references/use-case-marketplace.md +2 -3
  96. package/skills/cometchat-calls/references/use-case-support.md +3 -4
  97. package/skills/cometchat-calls/references/use-case-team.md +23 -12
  98. package/skills/cometchat-calls/references/use-case-telehealth.md +3 -4
  99. package/skills/cometchat-components/SKILL.md +163 -25
  100. package/skills/cometchat-core/SKILL.md +258 -20
  101. package/skills/cometchat-customization/SKILL.md +50 -25
  102. package/skills/cometchat-features/SKILL.md +314 -35
  103. package/skills/cometchat-flutter-v5/SKILL.md +10 -4
  104. package/skills/cometchat-flutter-v5-calls/SKILL.md +188 -158
  105. package/skills/cometchat-flutter-v5-calls/references/add-calls-to-existing-chat.md +48 -24
  106. package/skills/cometchat-flutter-v5-calls/references/call-layouts.md +20 -15
  107. package/skills/cometchat-flutter-v5-calls/references/call-session.md +100 -145
  108. package/skills/cometchat-flutter-v5-calls/references/device-management.md +12 -8
  109. package/skills/cometchat-flutter-v5-calls/references/group-calls.md +30 -36
  110. package/skills/cometchat-flutter-v5-calls/references/idle-timeout.md +15 -13
  111. package/skills/cometchat-flutter-v5-calls/references/in-call-chat.md +12 -9
  112. package/skills/cometchat-flutter-v5-calls/references/migration-v4-to-v5.md +115 -65
  113. package/skills/cometchat-flutter-v5-calls/references/raise-hand.md +41 -30
  114. package/skills/cometchat-flutter-v5-calls/references/ringing-integration.md +17 -14
  115. package/skills/cometchat-flutter-v5-calls/references/share-invite.md +8 -2
  116. package/skills/cometchat-flutter-v5-conversations/SKILL.md +2 -1
  117. package/skills/cometchat-flutter-v5-core/SKILL.md +5 -4
  118. package/skills/cometchat-flutter-v5-customization/SKILL.md +136 -5
  119. package/skills/cometchat-flutter-v5-events/SKILL.md +2 -1
  120. package/skills/cometchat-flutter-v5-messages/SKILL.md +2 -1
  121. package/skills/cometchat-flutter-v5-production/SKILL.md +15 -6
  122. package/skills/cometchat-flutter-v5-push/SKILL.md +2 -1
  123. package/skills/cometchat-flutter-v5-testing/SKILL.md +17 -6
  124. package/skills/cometchat-flutter-v5-theming/SKILL.md +2 -1
  125. package/skills/cometchat-flutter-v5-troubleshooting/SKILL.md +7 -6
  126. package/skills/cometchat-flutter-v5-users-groups/SKILL.md +3 -2
  127. package/skills/cometchat-flutter-v6/SKILL.md +17 -16
  128. package/skills/cometchat-flutter-v6-calls/SKILL.md +72 -57
  129. package/skills/cometchat-flutter-v6-calls/references/add-calls-to-existing-chat.md +5 -3
  130. package/skills/cometchat-flutter-v6-calls/references/advanced-features.md +89 -0
  131. package/skills/cometchat-flutter-v6-calls/references/call-layouts.md +15 -12
  132. package/skills/cometchat-flutter-v6-calls/references/call-session.md +2 -2
  133. package/skills/cometchat-flutter-v6-calls/references/device-management.md +9 -3
  134. package/skills/cometchat-flutter-v6-calls/references/group-calls.md +10 -10
  135. package/skills/cometchat-flutter-v6-calls/references/idle-timeout.md +15 -7
  136. package/skills/cometchat-flutter-v6-calls/references/in-call-chat.md +6 -3
  137. package/skills/cometchat-flutter-v6-calls/references/raise-hand.md +23 -16
  138. package/skills/cometchat-flutter-v6-components/SKILL.md +32 -11
  139. package/skills/cometchat-flutter-v6-conversations/SKILL.md +39 -11
  140. package/skills/cometchat-flutter-v6-core/SKILL.md +182 -21
  141. package/skills/cometchat-flutter-v6-customization/SKILL.md +97 -25
  142. package/skills/cometchat-flutter-v6-events/SKILL.md +3 -2
  143. package/skills/cometchat-flutter-v6-features/SKILL.md +15 -6
  144. package/skills/cometchat-flutter-v6-messages/SKILL.md +111 -60
  145. package/skills/cometchat-flutter-v6-migration/SKILL.md +18 -25
  146. package/skills/cometchat-flutter-v6-placement/SKILL.md +79 -50
  147. package/skills/cometchat-flutter-v6-production/SKILL.md +13 -12
  148. package/skills/cometchat-flutter-v6-push/SKILL.md +41 -19
  149. package/skills/cometchat-flutter-v6-testing/SKILL.md +4 -4
  150. package/skills/cometchat-flutter-v6-theming/SKILL.md +38 -5
  151. package/skills/cometchat-flutter-v6-troubleshooting/SKILL.md +182 -17
  152. package/skills/cometchat-flutter-v6-users-groups/SKILL.md +12 -4
  153. package/skills/cometchat-i18n/SKILL.md +140 -79
  154. package/skills/cometchat-ios/SKILL.md +4 -2
  155. package/skills/cometchat-ios-calls/SKILL.md +225 -95
  156. package/skills/cometchat-ios-calls/references/add-calls-to-existing-chat.md +11 -9
  157. package/skills/cometchat-ios-calls/references/audio-modes-and-controls.md +45 -0
  158. package/skills/cometchat-ios-calls/references/avaudiosession-routing.md +6 -7
  159. package/skills/cometchat-ios-calls/references/call-layouts.md +31 -91
  160. package/skills/cometchat-ios-calls/references/call-session.md +51 -54
  161. package/skills/cometchat-ios-calls/references/callkit-and-pushkit.md +33 -29
  162. package/skills/cometchat-ios-calls/references/custom-ui.md +38 -38
  163. package/skills/cometchat-ios-calls/references/group-calls.md +33 -70
  164. package/skills/cometchat-ios-calls/references/idle-timeout.md +24 -25
  165. package/skills/cometchat-ios-calls/references/in-call-chat.md +19 -23
  166. package/skills/cometchat-ios-calls/references/migration-v4-to-v5.md +128 -70
  167. package/skills/cometchat-ios-calls/references/picture-in-picture.md +20 -20
  168. package/skills/cometchat-ios-calls/references/raise-hand.md +14 -227
  169. package/skills/cometchat-ios-calls/references/recording-screen-share.md +35 -122
  170. package/skills/cometchat-ios-calls/references/ringing-integration.md +17 -16
  171. package/skills/cometchat-ios-calls/references/share-invite.md +8 -12
  172. package/skills/cometchat-ios-calls/references/swiftui-uikit-hosting.md +4 -4
  173. package/skills/cometchat-ios-components/SKILL.md +200 -12
  174. package/skills/cometchat-ios-core/SKILL.md +173 -45
  175. package/skills/cometchat-ios-customization/SKILL.md +276 -110
  176. package/skills/cometchat-ios-features/SKILL.md +64 -36
  177. package/skills/cometchat-ios-placement/SKILL.md +15 -12
  178. package/skills/cometchat-ios-production/SKILL.md +12 -4
  179. package/skills/cometchat-ios-push/SKILL.md +53 -19
  180. package/skills/cometchat-ios-testing/SKILL.md +14 -9
  181. package/skills/cometchat-ios-theming/SKILL.md +39 -3
  182. package/skills/cometchat-ios-troubleshooting/SKILL.md +41 -21
  183. package/skills/cometchat-native-bare-patterns/SKILL.md +36 -19
  184. package/skills/cometchat-native-calls/SKILL.md +29 -17
  185. package/skills/cometchat-native-calls/references/add-calls-to-existing-chat.md +2 -2
  186. package/skills/cometchat-native-calls/references/call-layouts.md +15 -14
  187. package/skills/cometchat-native-calls/references/call-session.md +2 -2
  188. package/skills/cometchat-native-calls/references/custom-ui.md +12 -8
  189. package/skills/cometchat-native-calls/references/device-management.md +53 -30
  190. package/skills/cometchat-native-calls/references/group-calls.md +35 -30
  191. package/skills/cometchat-native-calls/references/idle-timeout.md +6 -6
  192. package/skills/cometchat-native-calls/references/in-call-chat.md +10 -8
  193. package/skills/cometchat-native-calls/references/migration-v4-to-v5.md +2 -2
  194. package/skills/cometchat-native-calls/references/raise-hand.md +15 -13
  195. package/skills/cometchat-native-calls/references/recording-screen-share.md +49 -170
  196. package/skills/cometchat-native-calls/references/share-invite.md +7 -5
  197. package/skills/cometchat-native-calls/references/voip-push-end-to-end.md +4 -2
  198. package/skills/cometchat-native-components/SKILL.md +84 -52
  199. package/skills/cometchat-native-core/SKILL.md +102 -33
  200. package/skills/cometchat-native-customization/SKILL.md +150 -28
  201. package/skills/cometchat-native-expo-patterns/SKILL.md +60 -29
  202. package/skills/cometchat-native-features/SKILL.md +24 -17
  203. package/skills/cometchat-native-placement/SKILL.md +19 -10
  204. package/skills/cometchat-native-production/SKILL.md +9 -3
  205. package/skills/cometchat-native-push/SKILL.md +2 -1
  206. package/skills/cometchat-native-testing/SKILL.md +1 -2
  207. package/skills/cometchat-native-theming/SKILL.md +54 -29
  208. package/skills/cometchat-native-troubleshooting/SKILL.md +11 -5
  209. package/skills/cometchat-nextjs-patterns/SKILL.md +22 -8
  210. package/skills/cometchat-placement/SKILL.md +42 -3
  211. package/skills/cometchat-production/SKILL.md +12 -5
  212. package/skills/cometchat-react-calls/SKILL.md +220 -10
  213. package/skills/cometchat-react-calls/references/add-calls-to-existing-chat.md +4 -3
  214. package/skills/cometchat-react-calls/references/call-layouts.md +5 -6
  215. package/skills/cometchat-react-calls/references/call-session.md +1 -1
  216. package/skills/cometchat-react-calls/references/custom-ui.md +61 -15
  217. package/skills/cometchat-react-calls/references/device-management.md +55 -51
  218. package/skills/cometchat-react-calls/references/group-calls.md +18 -23
  219. package/skills/cometchat-react-calls/references/idle-timeout.md +25 -12
  220. package/skills/cometchat-react-calls/references/in-call-chat.md +7 -7
  221. package/skills/cometchat-react-calls/references/migration-v4-to-v5.md +9 -11
  222. package/skills/cometchat-react-calls/references/raise-hand.md +14 -14
  223. package/skills/cometchat-react-calls/references/recording-screen-share.md +39 -38
  224. package/skills/cometchat-react-calls/references/ringing-integration.md +2 -2
  225. package/skills/cometchat-react-calls/references/share-invite.md +4 -5
  226. package/skills/cometchat-react-calls/references/testing-calls-on-web.md +20 -2
  227. package/skills/cometchat-react-calls/references/virtual-background.md +32 -0
  228. package/skills/cometchat-react-patterns/SKILL.md +45 -5
  229. package/skills/cometchat-react-push/SKILL.md +258 -72
  230. package/skills/cometchat-react-router-patterns/SKILL.md +12 -6
  231. package/skills/cometchat-react-testing/SKILL.md +14 -5
  232. package/skills/cometchat-theming/SKILL.md +181 -18
  233. package/skills/cometchat-troubleshooting/SKILL.md +40 -20
@@ -33,25 +33,25 @@ No code needed beyond CallKit setup. The skill defaults to this path for standal
33
33
 
34
34
  ---
35
35
 
36
- ## SDK-managed PiP layout — `CallSession.shared.enablePictureInPictureLayout()`
36
+ ## SDK-managed PiP — `CometChatCalls.enterPIPMode()` / `exitPIPMode()`
37
37
 
38
- > **Audit 2026-05-14, confirmed against `https://www.cometchat.com/docs/calls/ios/picture-in-picture.md`:** The iOS Calls SDK v5.x exposes two methods to toggle the SDK's INTERNAL compact layout it does NOT expose video frames or a `CMSampleBuffer` pipeline to drive a host-app `AVPictureInPictureController`. An earlier draft of this doc cited `CometChatCalls.attachPictureInPictureLayer(layer)` / `detachPictureInPictureLayer()` **those symbols do not exist on CometChatCallsSDK v5.x**.
38
+ > **Verified against `CometChatCallsSDK` v5 Swift interface:** the SDK exposes two STATIC methods on `CometChatCalls` to toggle its internal picture-in-picture mode`CometChatCalls.enterPIPMode()` and `CometChatCalls.exitPIPMode()`. There is NO `CallSession.shared.enablePictureInPictureLayout()` (no `CallSession` type exists), and NO `CometChatCalls.attachPictureInPictureLayer(layer)` / `detachPictureInPictureLayer()`. The SDK does NOT expose video frames or a `CMSampleBuffer` pipeline to drive a host-app `AVPictureInPictureController`.
39
39
 
40
40
  ### What works today
41
41
 
42
42
  | Goal | API |
43
43
  |---|---|
44
- | Switch the SDK's call surface to compact "PiP-style" layout | `CallSession.shared.enablePictureInPictureLayout()` |
45
- | Switch back to full layout | `CallSession.shared.disablePictureInPictureLayout()` |
44
+ | Switch the SDK's call surface to compact PiP mode | `CometChatCalls.enterPIPMode()` |
45
+ | Switch back to full layout | `CometChatCalls.exitPIPMode()` |
46
46
 
47
47
  ```swift
48
48
  import CometChatCallsSDK
49
49
 
50
50
  // When the user taps "minimize" in the call UI
51
- CallSession.shared.enablePictureInPictureLayout()
51
+ CometChatCalls.enterPIPMode()
52
52
 
53
53
  // When they tap to expand back, or before hangup
54
- CallSession.shared.disablePictureInPictureLayout()
54
+ CometChatCalls.exitPIPMode()
55
55
  ```
56
56
 
57
57
  This is **NOT iOS system-level PiP** (the floating window that survives backgrounding). It's an in-app compact layout. For true OS-level PiP (floating call window across all apps + lock screen), see the CallKit path above.
@@ -61,29 +61,29 @@ This is **NOT iOS system-level PiP** (the floating window that survives backgrou
61
61
  Driving iOS system-level PiP via `AVPictureInPictureController` requires feeding video frames to an `AVSampleBufferDisplayLayer`. The Calls SDK does not expose its WebRTC video track for this — the peer-connection handle is internal. Three options:
62
62
 
63
63
  1. **Recommended: use CallKit** (rule 1.7 SKILL.md). CallKit-managed VoIP calls get auto-PiP for free — no `AVPictureInPictureController` plumbing needed.
64
- 2. **Use the SDK's compact layout API** (above) for in-app minimization. Acceptable UX for foreground-only flows.
64
+ 2. **Use the SDK's PiP-mode API** (above — `enterPIPMode()`/`exitPIPMode()`) for in-app minimization. Acceptable UX for foreground-only flows.
65
65
  3. **Roll your own WebRTC bridge.** Requires forking/patching the SDK to expose the underlying `RTCMediaStream` — not recommended.
66
66
 
67
67
  ### Required capability (CallKit path)
68
68
 
69
69
  In Xcode → Signing & Capabilities → Background Modes → ensure **Audio, AirPlay, and Picture in Picture** is checked. CallKit needs this; without it, CallKit's auto-PiP doesn't fire even with a CallKit-managed call.
70
70
 
71
- ### Toggle button for SDK compact layout
71
+ ### Toggle button for SDK PiP mode
72
72
 
73
73
  ```swift
74
74
  @IBAction func toggleCompactLayout(_ sender: UIButton) {
75
75
  if isCompact {
76
- CallSession.shared.disablePictureInPictureLayout()
76
+ CometChatCalls.exitPIPMode()
77
77
  } else {
78
- CallSession.shared.enablePictureInPictureLayout()
78
+ CometChatCalls.enterPIPMode()
79
79
  }
80
80
  isCompact.toggle()
81
81
  }
82
82
  ```
83
83
 
84
- This switches the SDK's call surface between full and compact layouts. The compact view shows local + remote video tiles in a smaller container; useful when you want to free screen space for other UI but keep the call visible.
84
+ This switches the SDK's call surface between full and compact PiP layouts. The compact view shows local + remote video tiles in a smaller container; useful when you want to free screen space for other UI but keep the call visible.
85
85
 
86
- > **Note**: `AVPictureInPictureController` + KVO on `isPictureInPicturePossible` patterns (previously documented here) are not applicable because the SDK does not expose the video frames `AVPictureInPictureController` requires. Use the CallKit path for system-level PiP, or this compact-layout API for in-app PiP-style minimization.
86
+ > **Note**: `AVPictureInPictureController` + KVO on `isPictureInPicturePossible` patterns (previously documented here) are not applicable because the SDK does not expose the video frames `AVPictureInPictureController` requires. Use the CallKit path for system-level PiP, or this `enterPIPMode()`/`exitPIPMode()` API for in-app PiP-style minimization.
87
87
 
88
88
  ---
89
89
 
@@ -185,11 +185,11 @@ When the call ends:
185
185
 
186
186
  ```swift
187
187
  func endCall() {
188
- // Switch SDK back to default layout BEFORE ending the session, otherwise
189
- // a re-init of the SDK can inherit compact-layout state on the next call.
190
- CallSession.shared.disablePictureInPictureLayout()
188
+ // Exit PiP mode BEFORE ending the session, otherwise a re-init of the SDK
189
+ // can inherit compact-layout state on the next call.
190
+ CometChatCalls.exitPIPMode()
191
191
 
192
- CallSession.shared.leaveSession() // ends the WebRTC session
192
+ CometChatCalls.endSession() // ends the WebRTC session (EXISTS in v5)
193
193
 
194
194
  do {
195
195
  try AVAudioSession.sharedInstance().setActive(false, options: .notifyOthersOnDeactivation)
@@ -203,7 +203,7 @@ If you ALSO drove a host-app `AVPictureInPictureController` (against an external
203
203
 
204
204
  ## Anti-patterns
205
205
 
206
- 1. **Using `CometChatCalls.attachPictureInPictureLayer(layer)` / `detachPictureInPictureLayer()`** — these symbols **do not exist** on `CometChatCallsSDK` v5.x. Confirmed against the SDK docs 2026-05-14. Use `CallSession.shared.enable/disablePictureInPictureLayout()` instead.
206
+ 1. **Using `CometChatCalls.attachPictureInPictureLayer(layer)` / `detachPictureInPictureLayer()`, or any `CallSession.shared.*PictureInPictureLayout()` call** none of these symbols exist on `CometChatCallsSDK` v5 (there is no `CallSession` type). Use `CometChatCalls.enterPIPMode()` / `CometChatCalls.exitPIPMode()` instead.
207
207
  2. **Manual `AVPictureInPictureController` for VoIP apps without CallKit.** Lock-screen ringing breaks; the SDK does not expose its video pipeline so the PiP window won't render the call. Use CallKit.
208
208
  3. **No `audio` background mode.** Audio cuts when the app backgrounds, regardless of PiP path.
209
209
  4. **Mixing SDK compact-layout with host-driven `AVPictureInPictureController`.** Two competing PiP surfaces — the SDK's compact layout fights the user's manual PiP, both look broken. Pick one.
@@ -216,9 +216,9 @@ If you ALSO drove a host-app `AVPictureInPictureController` (against an external
216
216
  - [ ] `audio` in `UIBackgroundModes` (Info.plist)
217
217
  - [ ] Background Modes capability includes "Audio, AirPlay, and Picture in Picture"
218
218
 
219
- **SDK compact-layout path (in-app PiP, no system-level PiP):**
220
- - [ ] `CallSession.shared.enablePictureInPictureLayout()` called to enter compact mode
221
- - [ ] `CallSession.shared.disablePictureInPictureLayout()` called BEFORE `leaveSession()` on hangup
219
+ **SDK PiP-mode path (in-app PiP, no system-level PiP):**
220
+ - [ ] `CometChatCalls.enterPIPMode()` called to enter compact mode
221
+ - [ ] `CometChatCalls.exitPIPMode()` called BEFORE `endSession()` on hangup
222
222
  - [ ] UI button to toggle between full/compact layouts
223
223
  - [ ] NOT used together with a host-app `AVPictureInPictureController` (see anti-pattern #4)
224
224
 
@@ -1,239 +1,26 @@
1
- # Raise hand on iOS
1
+ # Raise hand on iOS — NOT supported on the iOS Calls SDK v5
2
2
 
3
- Native CometChatCallsSDK exposes the same conceptual API as the JS SDK — `raiseHand()` / `lowerHand()` plus delegate callbacks. The wow piece is wiring it into UIKit / SwiftUI cleanly + the system-level UX (CallKit doesn't show raised-hand state on the lock screen, so the in-app surface is the canonical place).
3
+ **Raise-hand is not available on the iOS `CometChatCallsSDK` v5.** Do not emit any of these none of them exist on the SDK:
4
4
 
5
- **Canonical docs:** https://www.cometchat.com/docs/calls/ios/raise-hand
6
- **Read first:** `cometchat-react-calls/references/raise-hand.md` UX shape + anti-patterns are identical; this reference is the iOS-specific Swift wiring.
5
+ - `CometChatCalls.raiseHand()` / `CometChatCalls.lowerHand()`
6
+ - `onParticipantHandRaised` / `onParticipantHandLowered` (no such `CallsEventsDelegate` callbacks)
7
+ - any `setShowRaiseHandButton` / `enableRaiseHand` builder flag
7
8
 
8
- ---
9
-
10
- ## SDK API
11
-
12
- ```swift
13
- import CometChatCallsSDK
14
-
15
- // Local user
16
- CometChatCalls.raiseHand()
17
- CometChatCalls.lowerHand()
18
-
19
- // Listener — set via the call event listener attached at session start
20
- class CallListener: NSObject, CometChatCallsEventsListener {
21
- func onParticipantHandRaised(_ participant: Participant) {
22
- // participant.uid, participant.name
23
- }
24
- func onParticipantHandLowered(_ participant: Participant) {
25
- // ...
26
- }
27
- }
28
-
29
- // Settings flag
30
- let settings = CallSettingsBuilder()
31
- .setSessionType(.video)
32
- .hideRaiseHandButton(true)
33
- .build()
34
- ```
35
-
36
- ---
37
-
38
- ## SwiftUI integration — observable state holder
39
-
40
- ```swift
41
- import SwiftUI
42
- import Combine
43
- import CometChatCallsSDK
44
-
45
- struct RaisedParticipant: Identifiable {
46
- let id: String // uid
47
- let name: String
48
- let raisedAt: Date
49
- }
50
-
51
- final class RaiseHandState: ObservableObject {
52
- @Published var localRaised: Bool = false
53
- @Published var raised: [RaisedParticipant] = []
54
-
55
- func toggle() {
56
- if localRaised {
57
- CometChatCalls.lowerHand()
58
- } else {
59
- CometChatCalls.raiseHand()
60
- }
61
- localRaised.toggle()
62
- }
63
-
64
- func handle(participantRaised p: Participant) {
65
- DispatchQueue.main.async {
66
- let entry = RaisedParticipant(id: p.uid, name: p.name, raisedAt: Date())
67
- self.raised.removeAll { $0.id == p.uid }
68
- self.raised.append(entry)
69
- self.raised.sort { $0.raisedAt < $1.raisedAt }
70
- }
71
- }
72
-
73
- func handle(participantLowered p: Participant) {
74
- DispatchQueue.main.async {
75
- self.raised.removeAll { $0.id == p.uid }
76
- }
77
- }
78
- }
79
- ```
80
-
81
- `DispatchQueue.main.async` wraps SDK callbacks — same rule as elsewhere in iOS calls integrations (cf. `references/group-calls.md`). Without it, `@Published` updates from a background queue cause UI thread warnings + skipped re-renders.
82
-
83
- ---
84
-
85
- ## Toggle button (SwiftUI)
86
-
87
- ```swift
88
- struct RaiseHandButton: View {
89
- @ObservedObject var state: RaiseHandState
90
-
91
- var body: some View {
92
- Button(action: state.toggle) {
93
- Label(state.localRaised ? "Lower" : "Raise hand",
94
- systemImage: state.localRaised ? "hand.raised.fill" : "hand.raised")
95
- }
96
- .buttonStyle(.bordered)
97
- .tint(state.localRaised ? .yellow : .white)
98
- .accessibilityLabel(state.localRaised ? "Lower hand" : "Raise hand")
99
- .accessibilityAddTraits(state.localRaised ? .isSelected : [])
100
- .onChange(of: state.localRaised) { newValue in
101
- UIAccessibility.post(notification: .announcement, argument:
102
- newValue ? "Hand raised" : "Hand lowered")
103
- }
104
- }
105
- }
106
- ```
107
-
108
- `UIAccessibility.post(.announcement, ...)` is the iOS equivalent of web's `aria-live` and RN's `AccessibilityInfo.announceForAccessibility`. VoiceOver picks it up.
109
-
110
- ---
111
-
112
- ## Raised-hands sheet (SwiftUI)
9
+ The `CallsEventsDelegate` surface in v5 (verified against `CometChatCallsSDK` swiftinterface:29-54) is: `onSessionTimeout()`, `onCallEnded()`, `onCallEndButtonPressed()`, plus the participant/media events in BOTH a current TYPED form and a DEPRECATED `NSDictionary`/`NSArray` form — `onUserJoined(rtcUser:)`, `onUserLeft(rtcUser:)`, `onUserListChanged(rtcUsers:)`, `onAudioModeChanged(mode:)`, `onUserMuted(rtcMutedUser:)`, `onRecordingToggled(recordingInfo:)`, `onCallSwitchedToVideo(callSwitchedInfo:)`. Prefer the typed forms (`RTCUser`, `RTCMutedUser`, `RTCRecordingInfo`, `CallSwitchRequestInfo`, `CallAudioMode`). There is NO hand-raise event of any spelling.
113
10
 
114
- ```swift
115
- struct RaisedHandsSheet: View {
116
- @ObservedObject var state: RaiseHandState
11
+ ## If a customer asks for raise-hand on iOS
117
12
 
118
- var body: some View {
119
- VStack(alignment: .leading, spacing: 12) {
120
- Text("Raised hands (\(state.raised.count))")
121
- .font(.headline)
122
- if state.raised.isEmpty {
123
- Text("No hands raised").foregroundColor(.secondary)
124
- } else {
125
- ForEach(state.raised) { p in
126
- HStack {
127
- Text("✋").font(.title2)
128
- Text(p.name).font(.body)
129
- Spacer()
130
- Text(secondsAgo(p.raisedAt))
131
- .font(.caption)
132
- .foregroundColor(.secondary)
133
- }
134
- .padding(.vertical, 4)
135
- }
136
- }
137
- }
138
- .padding()
139
- .presentationDetents([.fraction(0.3), .medium])
140
- }
141
-
142
- func secondsAgo(_ t: Date) -> String {
143
- "\(Int(Date().timeIntervalSince(t)))s ago"
144
- }
145
- }
146
- ```
147
-
148
- `.presentationDetents([.fraction(0.3), .medium])` is iOS 16+ — gives the user two snap heights, matching the BottomSheet pattern from RN.
149
-
150
- ---
151
-
152
- ## UIKit pattern
153
-
154
- For UIKit projects (the kit's default surface):
155
-
156
- ```swift
157
- class CallViewController: UIViewController {
158
- private let state = RaiseHandState()
159
-
160
- override func viewDidLoad() {
161
- super.viewDidLoad()
162
- // ... attach state to call event listener at session start
163
- }
164
-
165
- @objc private func raiseHandTapped() {
166
- state.toggle()
167
- // Update the UIBarButtonItem appearance
168
- raiseHandButton.image = UIImage(systemName: state.localRaised ? "hand.raised.fill" : "hand.raised")
169
- raiseHandButton.tintColor = state.localRaised ? .systemYellow : .label
170
- }
171
-
172
- func presentRaisedHandsSheet() {
173
- let host = UIHostingController(rootView: RaisedHandsSheet(state: state))
174
- if #available(iOS 15.0, *) {
175
- host.sheetPresentationController?.detents = [.medium(), .large()]
176
- }
177
- present(host, animated: true)
178
- }
179
- }
180
- ```
181
-
182
- `UIHostingController(rootView:)` lets you embed a SwiftUI sheet in a UIKit nav stack. `sheetPresentationController.detents` is the iOS 15+ pull-up sheet API.
183
-
184
- ---
185
-
186
- ## Toast announcement for the host
187
-
188
- iOS has no native toast — use `UNUserNotificationCenter` for an in-call banner-style notification, OR a custom view:
189
-
190
- ```swift
191
- extension RaiseHandState {
192
- func showRaisedNotification(for p: Participant) {
193
- let banner = UIView()
194
- banner.backgroundColor = .systemYellow.withAlphaComponent(0.95)
195
- let label = UILabel()
196
- label.text = "✋ \(p.name) raised their hand"
197
- label.textColor = .black
198
- label.font = .systemFont(ofSize: 14, weight: .medium)
199
- // ...add to view, animate down from top, dismiss after 4s
200
- }
201
- }
202
- ```
203
-
204
- Or use a third-party lib like `NotificationBannerSwift`. Custom is fine; just don't use `UNUserNotificationCenter` (which is system-level and feels out of place for in-call signals).
205
-
206
- ---
207
-
208
- ## Anti-patterns
209
-
210
- Web sister reference rules apply, plus iOS-specific:
211
-
212
- 1. **`@Published` updates from non-main queue.** SwiftUI warns "publishing changes from background threads is not allowed." Always wrap SDK callbacks in `DispatchQueue.main.async`.
213
- 2. **Forgetting `accessibilityAddTraits(.isSelected)` on the toggle button.** VoiceOver doesn't announce "selected" state without it.
214
- 3. **Using `UNUserNotificationCenter`** for in-call raise-hand alerts. System-level; feels wrong. Use a custom banner.
215
- 4. **`removeAll { $0.id == p.uid }` then `append` without sort.** When a participant raises again after lowering, position in queue should reset to "now"; current code already does the right thing, but easy to break by reordering operations.
216
-
217
- ---
13
+ There is no SDK affordance to wire. The options are:
218
14
 
219
- ## Verification checklist
15
+ 1. **Build it out-of-band over the Chat SDK.** Send a custom message / transient message (e.g. `TransientMessage` or a typed `CustomMessage`) from the raising user, and have each client render a hand badge from those messages. This is app-level state the Calls SDK is not involved in.
16
+ 2. **Defer to web/Android** if the meeting must have first-class raise-hand and those platforms support it.
17
+ 3. **Wait for vendor support** — track the CometChat iOS Calls SDK release notes.
220
18
 
221
- - [ ] `RaiseHandState` is an `ObservableObject`
222
- - [ ] All SDK callbacks wrap in `DispatchQueue.main.async`
223
- - [ ] Toggle button has `accessibilityLabel` + `accessibilityAddTraits(.isSelected)` when raised
224
- - [ ] `UIAccessibility.post(.announcement, ...)` on toggle
225
- - [ ] Raised-hands list sorted by `raisedAt` ascending
226
- - [ ] `hideRaiseHandButton: true` in CallSettings if custom UI
227
- - [ ] Real-device smoke: 3 iPhones in same call, host sees both raised
228
- - [ ] VoiceOver smoke: enable VoiceOver, raise hand, hear "Hand raised" announcement
19
+ Do NOT scaffold a `CometChatCalls.raiseHand()` call path; it will not compile.
229
20
 
230
21
  ---
231
22
 
232
23
  ## Pointers
233
24
 
234
- - `cometchat-react-calls/references/raise-hand.md` — sister reference (UX shape)
235
- - `cometchat-ios-calls` SKILL.md — the seven hard rules
236
- - `references/group-calls.md` — group call iOS architecture
237
- - `references/swiftui-uikit-hosting.md` — embedding SwiftUI sheets in UIKit
238
- - `cometchat-a11y` — UIAccessibility patterns
239
- - Canonical docs: https://www.cometchat.com/docs/calls/ios/raise-hand
25
+ - `cometchat-react-calls/references/raise-hand.md` — web raise-hand (the feature shape, where it IS supported)
26
+ - `cometchat-ios-calls` SKILL.md — base hard rules
@@ -18,40 +18,34 @@ Same as web/RN — enable in **Dashboard → Chat & Messaging → Calls → Reco
18
18
  import CometChatCallsSDK
19
19
 
20
20
  let settings = CallSettingsBuilder()
21
- .setSessionType(.video)
22
21
  .setIsAudioOnly(false)
23
- .enableRecording(true) // server starts recording on session start
24
- .setShowRecordingButton(true) // user-toggleable mid-call
22
+ .setStartRecordingOnCallStart(true) // auto-start recording on session start
23
+ .setShowRecordingButton(true) // show the kit's user-toggleable REC button
25
24
  .build()
26
25
  ```
27
26
 
27
+ There is no `setSessionType` and no `enableRecording` on the iOS v5 builder. Auto-start is `setStartRecordingOnCallStart(_:)`; button visibility is `setShowRecordingButton(_:)`. To toggle recording programmatically mid-call, use the static `CometChatCalls.startRecording()` / `CometChatCalls.stopRecording()`.
28
+
28
29
  ### Lifecycle events (REC indicator)
29
30
 
30
- ```swift
31
- class CustomOngoingCallViewController: UIViewController {
32
- @IBOutlet weak var recBadge: UIView!
31
+ The iOS Calls SDK v5 has a SINGLE recording callback — `onRecordingToggled(info:)` on `CallsEventsDelegate` (swiftinterface label is `info:`, payload is an `NSDictionary`). There is no `onRecordingStarted`/`onRecordingStopped`/`onRecordingFailed` split, and the delegate is a protocol you conform to (not an object with assignable closure properties).
33
32
 
34
- func setupCallListener() {
35
- let listener = CometChatCallsEventsListener()
36
- listener.onRecordingStarted = { [weak self] in
37
- DispatchQueue.main.async { self?.recBadge.isHidden = false }
38
- }
39
- listener.onRecordingStopped = { [weak self] in
40
- DispatchQueue.main.async { self?.recBadge.isHidden = true }
41
- }
42
- listener.onRecordingFailed = { [weak self] error in
43
- DispatchQueue.main.async {
44
- let alert = UIAlertController(title: "Recording failed",
45
- message: error.message,
46
- preferredStyle: .alert)
47
- alert.addAction(UIAlertAction(title: "OK", style: .default))
48
- self?.present(alert, animated: true)
49
- }
33
+ ```swift
34
+ extension CustomOngoingCallViewController: CallsEventsDelegate {
35
+ // swiftinterface: onRecordingToggled(info: NSDictionary)
36
+ func onRecordingToggled(info: NSDictionary) {
37
+ DispatchQueue.main.async { [weak self] in
38
+ // info carries the current recording state + initiating user.
39
+ // Drive the REC badge from your own isRecording flag toggled here.
40
+ self?.isRecording.toggle()
41
+ self?.recBadge.isHidden = !(self?.isRecording ?? false)
50
42
  }
51
43
  }
52
44
  }
53
45
  ```
54
46
 
47
+ Wire the delegate via `CallSettingsBuilder.setDelegate(self)` or `CometChatCalls.addCallEventListener(observerId:delegate:)`. There is no separate recording-failure callback — surface failures from your own start/stop call sites if you toggle programmatically.
48
+
55
49
  The badge: a small "REC" pill with a blinking red dot. Must be visible to all participants — compliance requirement (CCPA, GDPR Art. 6/7, two-party-consent US states).
56
50
 
57
51
  ```swift
@@ -100,7 +94,7 @@ CometChat hosts the file. Same as web/RN — accessible via dashboard UI or REST
100
94
 
101
95
  ## Screen sharing — iOS Calls SDK v5.x does NOT support INITIATING
102
96
 
103
- **Audit finding 2026-05-14, confirmed against `https://www.cometchat.com/docs/calls/ios/screen-sharing.md`:** the iOS Calls SDK explicitly does not support initiating screen sharing. iOS callers can RECEIVE incoming screen shares from web/Android peers (via the `onParticipantStartedScreenShare` listener + `Call.isPresenting` property see "Viewer" section below) but cannot SEND.
97
+ **Confirmed against the v5 `CometChatCallsSDK` Swift interface:** the iOS Calls SDK does not support initiating screen sharing. iOS callees can RECEIVE incoming screen shares from web/Android peers the SDK renders the incoming screen track into the session view automatically — but `CallsEventsDelegate` exposes NO dedicated screen-share callback (no `onScreenShareStarted`/`onScreenShareEnded`, no `onParticipantStartedScreenShare`, no `OngoingCallListener`). iOS cannot SEND.
104
98
 
105
99
  The symbols previously documented in this file (`CometChatCalls.startScreenShareBroadcast`, `processBroadcastVideoFrame`, `processBroadcastAudioFrame`, `endScreenShareBroadcast`) **do not exist** on `CometChatCallsSDK` v5.x. If you've copied these from an earlier draft of this doc, they will not compile against the actual SDK.
106
100
 
@@ -108,8 +102,8 @@ The symbols previously documented in this file (`CometChatCalls.startScreenShare
108
102
 
109
103
  | Direction | Status | API |
110
104
  |---|---|---|
111
- | Receive screen share (iOS callee) | ✅ supported | `OngoingCallListener.onParticipantStartedScreenShare` + `Call.isPresenting` |
112
- | Initiate screen share (iOS caller → others) | ❌ NOT supported by CometChatCallsSDK v5.x | n/a |
105
+ | Receive screen share (iOS callee) | ✅ supported (rendered by the SDK into the session view) | no dedicated callback — the screen track renders like any remote video |
106
+ | Initiate screen share (iOS caller → others) | ❌ NOT supported by CometChatCallsSDK v5 | n/a |
113
107
 
114
108
  For applications that need iOS users to share their screen today, the practical options are:
115
109
 
@@ -193,93 +187,17 @@ class CustomOngoingCallViewController: UIViewController {
193
187
 
194
188
  When the user taps the picker, iOS shows the system broadcast UI listing your extension. They tap it; the extension activates; capture begins.
195
189
 
196
- ### Step 5 — SampleHandler.swift implementation (FICTIONAL SDK doesn't support this)
197
-
198
- > **⚠️ Audit 2026-05-14**: the symbols below (`CometChatCalls.startScreenShareBroadcast`, `processBroadcastVideoFrame`, `processBroadcastAudioFrame`, `endScreenShareBroadcast`) **do not exist on CometChatCallsSDK v5.x**. The vendor docs at `https://www.cometchat.com/docs/calls/ios/screen-sharing.md` state explicitly: *"The iOS Calls SDK does not support initiating screen sharing."* This code path will not compile. Kept here only to document what the architecture would look like if a future SDK version added support.
199
-
200
- The extension entry point. Receives audio + video sample buffers from iOS:
201
-
202
- ```swift
203
- import ReplayKit
204
- import CometChatCallsSDK
205
-
206
- class SampleHandler: RPBroadcastSampleHandler {
190
+ ### Steps 5–6SDK frame bridge: NOT available
207
191
 
208
- override func broadcastStarted(withSetupInfo setupInfo: [String : NSObject]?) {
209
- // Read the active session ID + auth token from the App Group
210
- let groupId = "group.com.yourcompany.yourapp.broadcast"
211
- let defaults = UserDefaults(suiteName: groupId)
212
-
213
- guard let sessionId = defaults?.string(forKey: "cometchat.sessionId"),
214
- let authToken = defaults?.string(forKey: "cometchat.authToken") else {
215
- finishBroadcastWithError(NSError(domain: "CometChat", code: 1,
216
- userInfo: [NSLocalizedDescriptionKey: "No active session"]))
217
- return
218
- }
219
-
220
- // Initialize the Calls SDK in screen-share mode for this session
221
- // (the SDK provides a setup helper; verify the exact symbol against installed CometChatCallsSDK)
222
- CometChatCalls.startScreenShareBroadcast(sessionID: sessionId, authToken: authToken)
223
- }
224
-
225
- override func processSampleBuffer(_ sampleBuffer: CMSampleBuffer, with sampleBufferType: RPSampleBufferType) {
226
- switch sampleBufferType {
227
- case .video:
228
- CometChatCalls.processBroadcastVideoFrame(sampleBuffer)
229
- case .audioApp:
230
- CometChatCalls.processBroadcastAudioFrame(sampleBuffer, type: .app)
231
- case .audioMic:
232
- CometChatCalls.processBroadcastAudioFrame(sampleBuffer, type: .mic)
233
- @unknown default:
234
- break
235
- }
236
- }
237
-
238
- override func broadcastFinished() {
239
- CometChatCalls.endScreenShareBroadcast()
240
- }
241
- }
242
- ```
243
-
244
- **Confirmed against the SDK docs 2026-05-14**: these symbols are NOT present in CometChatCallsSDK v5.x. The code above is illustrative only.
245
-
246
- ### Step 6 — Main app: pre-write session state to App Group before starting (FICTIONAL — see audit note above)
247
-
248
- In the main app's call code, before triggering the broadcast picker:
249
-
250
- ```swift
251
- func prepareScreenShare(sessionId: String, authToken: String) {
252
- let groupId = "group.com.yourcompany.yourapp.broadcast"
253
- let defaults = UserDefaults(suiteName: groupId)
254
- defaults?.set(sessionId, forKey: "cometchat.sessionId")
255
- defaults?.set(authToken, forKey: "cometchat.authToken")
256
- defaults?.synchronize()
257
- }
258
- ```
259
-
260
- Now when the user taps the picker, the extension can read this state on launch.
192
+ iOS cannot INITIATE screen share (receive-only). `CometChatCallsSDK` v5.x exposes no frame-bridge API (`startScreenShareBroadcast`/`processBroadcastVideoFrame`/`processBroadcastAudioFrame`/`endScreenShareBroadcast` are all absent), so there is no `SampleHandler` pipeline to write — defer screen-share initiation to web/Android peers.
261
193
 
262
194
  ---
263
195
 
264
196
  ## Viewer — receiving someone else's screen share
265
197
 
266
- Same pattern as RN/web. Listen for `onScreenShareStarted` and render the screen track in a dedicated view:
198
+ When a web/Android peer starts sharing, the iOS Calls SDK renders the incoming screen track into the session `view` you passed to `startSession` — exactly like any other remote video tile. There is **no** `onScreenShareStarted`/`onScreenShareEnded` callback on `CallsEventsDelegate` to hook (those symbols do not exist on iOS v5).
267
199
 
268
- ```swift
269
- listener.onScreenShareStarted = { [weak self] presenterUid in
270
- DispatchQueue.main.async {
271
- self?.showScreenShareView(presenterUid: presenterUid)
272
- }
273
- }
274
-
275
- listener.onScreenShareEnded = { [weak self] in
276
- DispatchQueue.main.async {
277
- self?.hideScreenShareView()
278
- }
279
- }
280
- ```
281
-
282
- The screen-share track renders in the SDK's container; for custom UI, the SDK exposes the track via `MediaStream` events the same way regular video is delivered.
200
+ If you need to react to participant changes around a screen share (e.g. relayout), use the typed participant callbacks — `onUserJoined(rtcUser:)`, `onUserLeft(rtcUser:)`, `onUserListChanged(rtcUsers:)` (swiftinterface:35,38,41 — `RTCUser` objects). For default-UI integrations no code is required: the SDK handles the screen-track layout for you.
283
201
 
284
202
  ---
285
203
 
@@ -291,7 +209,7 @@ The screen-share track renders in the SDK's container; for custom UI, the SDK ex
291
209
  | "No active session" finishBroadcastWithError | App Group identifier mismatch | Both targets must use the same `group.*` identifier |
292
210
  | Extension launches but no video on remote side | Missing `RPBroadcastProcessModeSampleBuffer` in extension Info.plist | Add it |
293
211
  | Recording flag set but no recording in dashboard | Plan doesn't include recording, or dashboard toggle off | Enable in dashboard |
294
- | REC badge missing | Custom UI — must render manually | Subscribe to `onRecordingStarted/Stopped` and render badge |
212
+ | REC badge missing | Custom UI — must render manually | Subscribe to `onRecordingToggled(info:)` and render badge |
295
213
  | Screen share doesn't end on call hangup | `broadcastFinished` not triggering | Manually call `RPBroadcastController.shared.finishBroadcast(...)` from main app on hangup |
296
214
 
297
215
  ---
@@ -311,23 +229,18 @@ The screen-share track renders in the SDK's container; for custom UI, the SDK ex
311
229
 
312
230
  **Recording:**
313
231
  - [ ] Dashboard plan includes recording feature
314
- - [ ] `enableRecording(true)` on `CallSettingsBuilder`
315
- - [ ] `onRecordingStarted` / `onRecordingStopped` listeners wired
232
+ - [ ] `setStartRecordingOnCallStart(true)` and/or `setShowRecordingButton(true)` on `CallSettingsBuilder` (no `enableRecording`)
233
+ - [ ] `onRecordingToggled(info:)` listener wired (single callback — no Started/Stopped/Failed split)
316
234
  - [ ] REC badge visible to all participants when active
317
- - [ ] `onRecordingFailed` surfaces user-facing alert
318
-
319
- **Screen share receiver side only (iOS Calls SDK v5.x cannot INITIATE):**
320
- - [ ] `OngoingCallListener.onParticipantStartedScreenShare` wired
321
- - [ ] `OngoingCallListener.onParticipantEndedScreenShare` wired
322
- - [ ] UI surfaces incoming-share state to the user (e.g. tile resize, presenter badge)
323
- - [ ] `Call.isPresenting` read where needed to gate UI affordances
324
- - [ ] Sender-side screen-share architecture (Broadcast Extension, SampleHandler) NOT implemented against current SDK the symbols don't exist (per audit 2026-05-14)
325
-
326
- **Real-device smoke:**
327
- - [ ] Tap broadcast picker → consent dialog → screen share begins
328
- - [ ] Other participants see the shared screen
329
- - [ ] End screen share via system overlay → returns to camera view
330
- - [ ] Hangup ends broadcast even if user didn't manually stop sharing
235
+
236
+ **Screen share — receiver side only (iOS Calls SDK v5 cannot INITIATE):**
237
+ - [ ] No code required for default UI — the SDK renders the incoming screen track into the session view
238
+ - [ ] No `onScreenShareStarted`/`onScreenShareEnded`/`onParticipantStartedScreenShare`/`OngoingCallListener` referenced (none exist on iOS v5)
239
+ - [ ] Sender-side screen-share architecture (Broadcast Extension, SampleHandler) NOT implemented against current SDK — the symbols don't exist
240
+
241
+ **Real-device smoke (receive-only iOS cannot INITIATE screen share):**
242
+ - [ ] When a participant on another platform (web/Android) shares their screen, it renders in the iOS call view
243
+ - [ ] No sender-side broadcast picker/UI is shown on iOS (there is no initiation API in the v5 SDK)
331
244
 
332
245
  ---
333
246
 
@@ -1,6 +1,6 @@
1
1
  # Ringing — call signaling with custom UI (iOS)
2
2
 
3
- iOS-specific deltas: PushKit + CallKit are mandatory for backgrounded ring delivery; foreground ringing uses CometChatCallsEventsListener; AVAudioSession routing.
3
+ iOS-specific deltas: PushKit + CallKit are mandatory for backgrounded ring delivery; foreground ringing uses the Chat SDK's `CometChatCallDelegate` (NOT the Calls SDK's `CallsEventsDelegate`); AVAudioSession routing.
4
4
 
5
5
  **Read first:** `cometchat-react-calls/references/ringing-integration.md` — full architecture, hard rules.
6
6
 
@@ -12,41 +12,42 @@ iOS-specific deltas: PushKit + CallKit are mandatory for backgrounded ring deliv
12
12
  import CometChatSDK
13
13
  import CometChatCallsSDK
14
14
 
15
- let call = Call(receiverUid: receiverUid, callType: .video, receiverType: .user)
16
- CometChat.initiateCall(call: call) { result in
17
- switch result {
18
- case .success(let outgoing): self.showOutgoingCallScreen(outgoing)
19
- case .onError(let err): print("Initiate failed:", err)
20
- }
21
- }
15
+ let call = Call(receiverId: receiverUid, callType: .video, receiverType: .user)
16
+ CometChat.initiateCall(call: call, onSuccess: { outgoing in
17
+ self.showOutgoingCallScreen(outgoing)
18
+ }, onError: { err in
19
+ print("Initiate failed:", err)
20
+ })
22
21
  ```
23
22
 
24
23
  ---
25
24
 
26
25
  ## Foreground listener
27
26
 
28
- Implement `CometChatCallsEventsListener` and register at app start:
27
+ Ringing/signaling events live on the Chat SDK's `CometChatCallDelegate` (its callbacks take TWO params: the call and an error). Implement it and register at app start with the positional `CometChat.addCallListener(_:_:)`:
29
28
 
30
29
  ```swift
31
- class AppCallListener: CometChatCallsEventsListener {
32
- func onIncomingCallReceived(call: Call) {
30
+ class AppCallListener: NSObject, CometChatCallDelegate {
31
+ func onIncomingCallReceived(incomingCall: Call?, error: CometChatException?) {
32
+ guard let call = incomingCall else { return }
33
33
  DispatchQueue.main.async { showIncomingCallScreen(call) }
34
34
  }
35
- func onOutgoingCallAccepted(call: Call) {
35
+ func onOutgoingCallAccepted(acceptedCall: Call?, error: CometChatException?) {
36
+ guard let call = acceptedCall else { return }
36
37
  DispatchQueue.main.async { startCallSession(sessionId: call.sessionId) }
37
38
  }
38
- func onIncomingCallCancelled(call: Call) {
39
+ func onIncomingCallCancelled(canceledCall: Call?, error: CometChatException?) {
39
40
  DispatchQueue.main.async { dismissIncomingCallScreen() }
40
41
  }
41
- func onOutgoingCallRejected(call: Call) {
42
+ func onOutgoingCallRejected(rejectedCall: Call?, error: CometChatException?) {
42
43
  DispatchQueue.main.async { dismissOutgoingCallScreen() }
43
44
  }
44
- func onCallEndedMessageReceived(call: Call) {
45
+ func onCallEndedMessageReceived(endedCall: Call?, error: CometChatException?) {
45
46
  DispatchQueue.main.async { teardownCallUI() }
46
47
  }
47
48
  }
48
49
 
49
- CometChat.addCallListener(id: "app", listener: AppCallListener())
50
+ CometChat.addCallListener("app", AppCallListener()) // positional labels
50
51
  ```
51
52
 
52
53
  Add this in `AppDelegate.didFinishLaunchingWithOptions` AFTER `CometChat.init` succeeds.