@cometchat/skills 4.3.0 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/bin/install.js +27 -0
- package/package.json +14 -1
- package/skills/cometchat/SKILL.md +233 -69
- package/skills/cometchat/references/asking-questions.md +48 -0
- package/skills/cometchat-a11y/SKILL.md +3 -2
- package/skills/cometchat-android-v5/SKILL.md +2 -1
- package/skills/cometchat-android-v5-calls/SKILL.md +36 -22
- package/skills/cometchat-android-v5-calls/references/README.md +1 -1
- package/skills/cometchat-android-v5-calls/references/add-calls-to-existing-chat.md +7 -5
- package/skills/cometchat-android-v5-calls/references/audio-controls.md +4 -4
- package/skills/cometchat-android-v5-calls/references/call-layouts.md +33 -25
- package/skills/cometchat-android-v5-calls/references/call-session.md +2 -2
- package/skills/cometchat-android-v5-calls/references/custom-ui.md +5 -5
- package/skills/cometchat-android-v5-calls/references/event-listeners.md +2 -2
- package/skills/cometchat-android-v5-calls/references/idle-timeout.md +20 -14
- package/skills/cometchat-android-v5-calls/references/in-call-chat.md +1 -1
- package/skills/cometchat-android-v5-calls/references/migration-v4-to-v5.md +43 -27
- package/skills/cometchat-android-v5-calls/references/participant-management.md +3 -3
- package/skills/cometchat-android-v5-calls/references/raise-hand.md +25 -19
- package/skills/cometchat-android-v5-calls/references/recording.md +2 -2
- package/skills/cometchat-android-v5-calls/references/ringing-integration.md +1 -1
- package/skills/cometchat-android-v5-calls/references/screen-sharing.md +5 -9
- package/skills/cometchat-android-v5-calls/references/session-settings.md +3 -3
- package/skills/cometchat-android-v5-calls/references/setup.md +1 -1
- package/skills/cometchat-android-v5-calls/references/share-invite.md +9 -4
- package/skills/cometchat-android-v5-calls/references/video-controls.md +4 -4
- package/skills/cometchat-android-v5-calls/references/voip-calling.md +2 -2
- package/skills/cometchat-android-v5-components/SKILL.md +4 -3
- package/skills/cometchat-android-v5-core/SKILL.md +5 -3
- package/skills/cometchat-android-v5-customization/SKILL.md +171 -7
- package/skills/cometchat-android-v5-extensions/SKILL.md +7 -4
- package/skills/cometchat-android-v5-features/SKILL.md +5 -4
- package/skills/cometchat-android-v5-placement/SKILL.md +2 -1
- package/skills/cometchat-android-v5-production/SKILL.md +2 -1
- package/skills/cometchat-android-v5-push/SKILL.md +2 -3
- package/skills/cometchat-android-v5-testing/SKILL.md +2 -1
- package/skills/cometchat-android-v5-theming/SKILL.md +2 -1
- package/skills/cometchat-android-v5-troubleshooting/SKILL.md +3 -2
- package/skills/cometchat-android-v6/SKILL.md +2 -1
- package/skills/cometchat-android-v6-builder-settings/SKILL.md +11 -7
- package/skills/cometchat-android-v6-calls/SKILL.md +79 -18
- package/skills/cometchat-android-v6-calls/references/advanced-features.md +87 -0
- package/skills/cometchat-android-v6-calls/references/call-layouts.md +24 -15
- package/skills/cometchat-android-v6-calls/references/call-session.md +2 -2
- package/skills/cometchat-android-v6-calls/references/device-management.md +17 -16
- package/skills/cometchat-android-v6-calls/references/idle-timeout.md +7 -4
- package/skills/cometchat-android-v6-calls/references/in-call-chat.md +13 -8
- package/skills/cometchat-android-v6-calls/references/raise-hand.md +6 -4
- package/skills/cometchat-android-v6-compose-components/SKILL.md +52 -29
- package/skills/cometchat-android-v6-compose-customization/SKILL.md +156 -1
- package/skills/cometchat-android-v6-compose-placement/SKILL.md +129 -40
- package/skills/cometchat-android-v6-compose-theming/SKILL.md +27 -1
- package/skills/cometchat-android-v6-core/SKILL.md +208 -28
- package/skills/cometchat-android-v6-events/SKILL.md +4 -1
- package/skills/cometchat-android-v6-extensions/SKILL.md +2 -1
- package/skills/cometchat-android-v6-features/SKILL.md +26 -2
- package/skills/cometchat-android-v6-kotlin-components/SKILL.md +31 -1
- package/skills/cometchat-android-v6-kotlin-customization/SKILL.md +172 -1
- package/skills/cometchat-android-v6-kotlin-placement/SKILL.md +20 -5
- package/skills/cometchat-android-v6-kotlin-theming/SKILL.md +36 -5
- package/skills/cometchat-android-v6-migration/SKILL.md +44 -42
- package/skills/cometchat-android-v6-production/SKILL.md +6 -3
- package/skills/cometchat-android-v6-push/SKILL.md +43 -2
- package/skills/cometchat-android-v6-testing/SKILL.md +11 -8
- package/skills/cometchat-android-v6-troubleshooting/SKILL.md +26 -5
- package/skills/cometchat-angular-calls/SKILL.md +256 -389
- package/skills/cometchat-angular-calls/references/add-calls-to-existing-chat.md +3 -2
- package/skills/cometchat-angular-calls/references/call-layouts.md +29 -12
- package/skills/cometchat-angular-calls/references/call-session.md +2 -2
- package/skills/cometchat-angular-calls/references/custom-ui.md +18 -10
- package/skills/cometchat-angular-calls/references/device-management.md +53 -34
- package/skills/cometchat-angular-calls/references/group-calls.md +45 -24
- package/skills/cometchat-angular-calls/references/idle-timeout.md +31 -15
- package/skills/cometchat-angular-calls/references/ngzone-and-async-callbacks.md +7 -6
- package/skills/cometchat-angular-calls/references/raise-hand.md +9 -4
- package/skills/cometchat-angular-calls/references/recording-screen-share.md +32 -39
- package/skills/cometchat-angular-calls/references/ringing-integration.md +3 -1
- package/skills/cometchat-angular-calls/references/share-invite.md +11 -5
- package/skills/cometchat-angular-calls/references/virtual-background.md +29 -0
- package/skills/cometchat-angular-components/SKILL.md +149 -620
- package/skills/cometchat-angular-core/SKILL.md +232 -312
- package/skills/cometchat-angular-customization/SKILL.md +415 -223
- package/skills/cometchat-angular-features/SKILL.md +216 -334
- package/skills/cometchat-angular-patterns/SKILL.md +168 -359
- package/skills/cometchat-angular-placement/SKILL.md +189 -560
- package/skills/cometchat-angular-production/SKILL.md +241 -92
- package/skills/cometchat-angular-push/SKILL.md +280 -294
- package/skills/cometchat-angular-testing/SKILL.md +430 -158
- package/skills/cometchat-angular-theming/SKILL.md +190 -265
- package/skills/cometchat-angular-troubleshooting/SKILL.md +192 -157
- package/skills/cometchat-astro-patterns/SKILL.md +2 -1
- package/skills/cometchat-calls/SKILL.md +25 -19
- package/skills/cometchat-calls/references/use-case-broadcast.md +15 -10
- package/skills/cometchat-calls/references/use-case-marketplace.md +2 -3
- package/skills/cometchat-calls/references/use-case-support.md +3 -4
- package/skills/cometchat-calls/references/use-case-team.md +23 -12
- package/skills/cometchat-calls/references/use-case-telehealth.md +3 -4
- package/skills/cometchat-components/SKILL.md +163 -25
- package/skills/cometchat-core/SKILL.md +255 -19
- package/skills/cometchat-customization/SKILL.md +50 -25
- package/skills/cometchat-features/SKILL.md +313 -34
- package/skills/cometchat-flutter-v5/SKILL.md +10 -4
- package/skills/cometchat-flutter-v5-calls/SKILL.md +188 -158
- package/skills/cometchat-flutter-v5-calls/references/add-calls-to-existing-chat.md +48 -24
- package/skills/cometchat-flutter-v5-calls/references/call-layouts.md +20 -15
- package/skills/cometchat-flutter-v5-calls/references/call-session.md +100 -145
- package/skills/cometchat-flutter-v5-calls/references/device-management.md +12 -8
- package/skills/cometchat-flutter-v5-calls/references/group-calls.md +30 -36
- package/skills/cometchat-flutter-v5-calls/references/idle-timeout.md +15 -13
- package/skills/cometchat-flutter-v5-calls/references/in-call-chat.md +12 -9
- package/skills/cometchat-flutter-v5-calls/references/migration-v4-to-v5.md +115 -65
- package/skills/cometchat-flutter-v5-calls/references/raise-hand.md +41 -30
- package/skills/cometchat-flutter-v5-calls/references/ringing-integration.md +17 -14
- package/skills/cometchat-flutter-v5-calls/references/share-invite.md +8 -2
- package/skills/cometchat-flutter-v5-conversations/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-core/SKILL.md +5 -4
- package/skills/cometchat-flutter-v5-customization/SKILL.md +136 -5
- package/skills/cometchat-flutter-v5-events/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-messages/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-production/SKILL.md +15 -6
- package/skills/cometchat-flutter-v5-push/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-testing/SKILL.md +17 -6
- package/skills/cometchat-flutter-v5-theming/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-troubleshooting/SKILL.md +7 -6
- package/skills/cometchat-flutter-v5-users-groups/SKILL.md +3 -2
- package/skills/cometchat-flutter-v6/SKILL.md +17 -16
- package/skills/cometchat-flutter-v6-calls/SKILL.md +72 -57
- package/skills/cometchat-flutter-v6-calls/references/add-calls-to-existing-chat.md +5 -3
- package/skills/cometchat-flutter-v6-calls/references/advanced-features.md +89 -0
- package/skills/cometchat-flutter-v6-calls/references/call-layouts.md +15 -12
- package/skills/cometchat-flutter-v6-calls/references/call-session.md +2 -2
- package/skills/cometchat-flutter-v6-calls/references/device-management.md +9 -3
- package/skills/cometchat-flutter-v6-calls/references/group-calls.md +10 -10
- package/skills/cometchat-flutter-v6-calls/references/idle-timeout.md +15 -7
- package/skills/cometchat-flutter-v6-calls/references/in-call-chat.md +6 -3
- package/skills/cometchat-flutter-v6-calls/references/raise-hand.md +23 -16
- package/skills/cometchat-flutter-v6-components/SKILL.md +32 -11
- package/skills/cometchat-flutter-v6-conversations/SKILL.md +39 -11
- package/skills/cometchat-flutter-v6-core/SKILL.md +182 -21
- package/skills/cometchat-flutter-v6-customization/SKILL.md +97 -25
- package/skills/cometchat-flutter-v6-events/SKILL.md +3 -2
- package/skills/cometchat-flutter-v6-features/SKILL.md +15 -6
- package/skills/cometchat-flutter-v6-messages/SKILL.md +111 -60
- package/skills/cometchat-flutter-v6-migration/SKILL.md +18 -25
- package/skills/cometchat-flutter-v6-placement/SKILL.md +79 -50
- package/skills/cometchat-flutter-v6-production/SKILL.md +13 -12
- package/skills/cometchat-flutter-v6-push/SKILL.md +41 -19
- package/skills/cometchat-flutter-v6-testing/SKILL.md +4 -4
- package/skills/cometchat-flutter-v6-theming/SKILL.md +38 -5
- package/skills/cometchat-flutter-v6-troubleshooting/SKILL.md +182 -17
- package/skills/cometchat-flutter-v6-users-groups/SKILL.md +12 -4
- package/skills/cometchat-i18n/SKILL.md +139 -78
- package/skills/cometchat-ios/SKILL.md +4 -2
- package/skills/cometchat-ios-calls/SKILL.md +225 -95
- package/skills/cometchat-ios-calls/references/add-calls-to-existing-chat.md +11 -9
- package/skills/cometchat-ios-calls/references/audio-modes-and-controls.md +45 -0
- package/skills/cometchat-ios-calls/references/avaudiosession-routing.md +6 -7
- package/skills/cometchat-ios-calls/references/call-layouts.md +31 -91
- package/skills/cometchat-ios-calls/references/call-session.md +51 -54
- package/skills/cometchat-ios-calls/references/callkit-and-pushkit.md +33 -29
- package/skills/cometchat-ios-calls/references/custom-ui.md +38 -38
- package/skills/cometchat-ios-calls/references/group-calls.md +33 -70
- package/skills/cometchat-ios-calls/references/idle-timeout.md +24 -25
- package/skills/cometchat-ios-calls/references/in-call-chat.md +19 -23
- package/skills/cometchat-ios-calls/references/migration-v4-to-v5.md +128 -70
- package/skills/cometchat-ios-calls/references/picture-in-picture.md +20 -20
- package/skills/cometchat-ios-calls/references/raise-hand.md +14 -227
- package/skills/cometchat-ios-calls/references/recording-screen-share.md +35 -122
- package/skills/cometchat-ios-calls/references/ringing-integration.md +17 -16
- package/skills/cometchat-ios-calls/references/share-invite.md +8 -12
- package/skills/cometchat-ios-calls/references/swiftui-uikit-hosting.md +4 -4
- package/skills/cometchat-ios-components/SKILL.md +200 -12
- package/skills/cometchat-ios-core/SKILL.md +173 -45
- package/skills/cometchat-ios-customization/SKILL.md +276 -110
- package/skills/cometchat-ios-features/SKILL.md +64 -36
- package/skills/cometchat-ios-placement/SKILL.md +15 -12
- package/skills/cometchat-ios-production/SKILL.md +12 -4
- package/skills/cometchat-ios-push/SKILL.md +53 -19
- package/skills/cometchat-ios-testing/SKILL.md +14 -9
- package/skills/cometchat-ios-theming/SKILL.md +39 -3
- package/skills/cometchat-ios-troubleshooting/SKILL.md +41 -21
- package/skills/cometchat-native-bare-patterns/SKILL.md +34 -17
- package/skills/cometchat-native-calls/SKILL.md +28 -16
- package/skills/cometchat-native-calls/references/add-calls-to-existing-chat.md +2 -2
- package/skills/cometchat-native-calls/references/call-layouts.md +15 -14
- package/skills/cometchat-native-calls/references/call-session.md +2 -2
- package/skills/cometchat-native-calls/references/custom-ui.md +12 -8
- package/skills/cometchat-native-calls/references/device-management.md +53 -30
- package/skills/cometchat-native-calls/references/group-calls.md +35 -30
- package/skills/cometchat-native-calls/references/idle-timeout.md +6 -6
- package/skills/cometchat-native-calls/references/in-call-chat.md +10 -8
- package/skills/cometchat-native-calls/references/migration-v4-to-v5.md +2 -2
- package/skills/cometchat-native-calls/references/raise-hand.md +15 -13
- package/skills/cometchat-native-calls/references/recording-screen-share.md +49 -170
- package/skills/cometchat-native-calls/references/share-invite.md +7 -5
- package/skills/cometchat-native-calls/references/voip-push-end-to-end.md +4 -2
- package/skills/cometchat-native-components/SKILL.md +84 -52
- package/skills/cometchat-native-core/SKILL.md +101 -32
- package/skills/cometchat-native-customization/SKILL.md +150 -28
- package/skills/cometchat-native-expo-patterns/SKILL.md +57 -26
- package/skills/cometchat-native-features/SKILL.md +23 -16
- package/skills/cometchat-native-placement/SKILL.md +19 -10
- package/skills/cometchat-native-production/SKILL.md +9 -3
- package/skills/cometchat-native-push/SKILL.md +2 -1
- package/skills/cometchat-native-testing/SKILL.md +1 -2
- package/skills/cometchat-native-theming/SKILL.md +54 -29
- package/skills/cometchat-native-troubleshooting/SKILL.md +9 -3
- package/skills/cometchat-nextjs-patterns/SKILL.md +20 -6
- package/skills/cometchat-placement/SKILL.md +42 -3
- package/skills/cometchat-production/SKILL.md +12 -5
- package/skills/cometchat-react-calls/SKILL.md +220 -10
- package/skills/cometchat-react-calls/references/add-calls-to-existing-chat.md +4 -3
- package/skills/cometchat-react-calls/references/call-layouts.md +5 -6
- package/skills/cometchat-react-calls/references/call-session.md +1 -1
- package/skills/cometchat-react-calls/references/custom-ui.md +61 -15
- package/skills/cometchat-react-calls/references/device-management.md +55 -51
- package/skills/cometchat-react-calls/references/group-calls.md +18 -23
- package/skills/cometchat-react-calls/references/idle-timeout.md +25 -12
- package/skills/cometchat-react-calls/references/in-call-chat.md +7 -7
- package/skills/cometchat-react-calls/references/migration-v4-to-v5.md +9 -11
- package/skills/cometchat-react-calls/references/raise-hand.md +14 -14
- package/skills/cometchat-react-calls/references/recording-screen-share.md +39 -38
- package/skills/cometchat-react-calls/references/ringing-integration.md +2 -2
- package/skills/cometchat-react-calls/references/share-invite.md +4 -5
- package/skills/cometchat-react-calls/references/testing-calls-on-web.md +20 -2
- package/skills/cometchat-react-calls/references/virtual-background.md +32 -0
- package/skills/cometchat-react-patterns/SKILL.md +44 -4
- package/skills/cometchat-react-push/SKILL.md +258 -72
- package/skills/cometchat-react-router-patterns/SKILL.md +10 -4
- package/skills/cometchat-react-testing/SKILL.md +14 -5
- package/skills/cometchat-theming/SKILL.md +181 -18
- package/skills/cometchat-troubleshooting/SKILL.md +40 -20
|
@@ -61,8 +61,8 @@ import CometChatSDK
|
|
|
61
61
|
|
|
62
62
|
func initiateGroupCall(guid: String, isVideo: Bool) async throws -> Call {
|
|
63
63
|
let group = try await fetchGroup(guid)
|
|
64
|
-
let callType: CallType = isVideo ? .video : .voice
|
|
65
|
-
let call = Call(
|
|
64
|
+
let callType: CallType = isVideo ? .video : .audio // CallType has no .voice
|
|
65
|
+
let call = Call(receiverId: group.guid, callType: callType, receiverType: .group)
|
|
66
66
|
|
|
67
67
|
return try await withCheckedThrowingContinuation { cont in
|
|
68
68
|
CometChat.initiateCall(call: call,
|
|
@@ -122,35 +122,28 @@ Diffable data source means roster updates animate cleanly without cell-recreatio
|
|
|
122
122
|
|
|
123
123
|
---
|
|
124
124
|
|
|
125
|
-
##
|
|
125
|
+
## Participant-roster observation
|
|
126
126
|
|
|
127
|
-
`
|
|
127
|
+
> **The iOS Calls SDK v5 has NO active-speaker callback.** `CallsEventsDelegate` exposes no `onActiveSpeakerUpdated` (and no `onUserListUpdated`). If you want an active-speaker spotlight on iOS, the SDK won't drive it — use the SDK's built-in spotlight mode instead (set via `CallSettingsBuilder.setMode(.spotlight)` — the typed `DisplayModes` enum, swiftinterface:175/281), which the SDK lays out internally.
|
|
128
|
+
|
|
129
|
+
For a custom roster, observe the participant callbacks that DO exist — use the TYPED forms `onUserJoined(rtcUser:)`, `onUserLeft(rtcUser:)`, `onUserListChanged(rtcUsers:)` (swiftinterface:35,38,41). They deliver `RTCUser` objects (swiftinterface:139 — `uid`, `avatar`, `name`, `jwt`, `resource`), so read typed properties instead of parsing dictionaries. The `NSDictionary`/`NSArray` forms are DEPRECATED.
|
|
128
130
|
|
|
129
131
|
```swift
|
|
130
|
-
|
|
131
|
-
@Published var activeSpeakerUid: String?
|
|
132
|
-
@Published var participants: [Participant] = []
|
|
132
|
+
import CometChatCallsSDK
|
|
133
133
|
|
|
134
|
-
|
|
134
|
+
final class CallStateObserver: NSObject, ObservableObject, CallsEventsDelegate {
|
|
135
|
+
@Published var participants: [RTCUser] = []
|
|
135
136
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
debounceTimer = Timer.scheduledTimer(withTimeInterval: 0.5, repeats: false) { [weak self] _ in
|
|
139
|
-
DispatchQueue.main.async {
|
|
140
|
-
self?.activeSpeakerUid = uid
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
func onUserListUpdated(_ users: [Participant]) {
|
|
137
|
+
// swiftinterface:41 onUserListChanged(rtcUsers: [RTCUser])
|
|
138
|
+
func onUserListChanged(rtcUsers: [RTCUser]) {
|
|
146
139
|
DispatchQueue.main.async {
|
|
147
|
-
self.participants =
|
|
140
|
+
self.participants = rtcUsers
|
|
148
141
|
}
|
|
149
142
|
}
|
|
150
143
|
}
|
|
151
144
|
```
|
|
152
145
|
|
|
153
|
-
|
|
146
|
+
Wire it via `CallSettingsBuilder.setDelegate(self)` or `CometChatCalls.addCallEventListener(observerId:delegate:)`.
|
|
154
147
|
|
|
155
148
|
`@Published` works in both SwiftUI (via `@StateObject`) and UIKit (via Combine subscriptions). Pick one path; don't mix.
|
|
156
149
|
|
|
@@ -202,63 +195,35 @@ The `Identifiable` conformance on `Participant` (with `id = uid`) is what makes
|
|
|
202
195
|
|
|
203
196
|
---
|
|
204
197
|
|
|
205
|
-
## Moderator actions —
|
|
206
|
-
|
|
207
|
-
```swift
|
|
208
|
-
extension GroupCallViewController {
|
|
209
|
-
@objc func participantTapped(_ sender: UITapGestureRecognizer) {
|
|
210
|
-
guard let cell = sender.view as? ParticipantCell,
|
|
211
|
-
let participant = cell.participant else { return }
|
|
212
|
-
guard canModerate else { return } // gate
|
|
213
|
-
|
|
214
|
-
let alert = UIAlertController(title: participant.name, message: nil, preferredStyle: .actionSheet)
|
|
215
|
-
alert.addAction(UIAlertAction(title: "Mute", style: .default) { _ in
|
|
216
|
-
Task { try? await CometChatCalls.muteUser(uid: participant.uid) }
|
|
217
|
-
})
|
|
218
|
-
alert.addAction(UIAlertAction(title: "Remove from call", style: .destructive) { _ in
|
|
219
|
-
Task { try? await CometChatCalls.removeUser(uid: participant.uid) }
|
|
220
|
-
})
|
|
221
|
-
alert.addAction(UIAlertAction(title: "Cancel", style: .cancel))
|
|
222
|
-
|
|
223
|
-
if let popover = alert.popoverPresentationController {
|
|
224
|
-
popover.sourceView = cell
|
|
225
|
-
popover.sourceRect = cell.bounds
|
|
226
|
-
}
|
|
227
|
-
present(alert, animated: true)
|
|
228
|
-
}
|
|
198
|
+
## Moderator actions — not in the Calls SDK
|
|
229
199
|
|
|
230
|
-
|
|
231
|
-
return group?.scope == "admin" || group?.scope == "moderator"
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
```
|
|
200
|
+
> **There are NO in-call moderator APIs on the iOS Calls SDK v5.** `CometChatCalls` has no `muteUser(uid:)` and no `removeUser(uid:)` (verified against the `CometChatCallsSDK` swiftinterface). Do not scaffold these — they won't compile.
|
|
235
201
|
|
|
236
|
-
`
|
|
202
|
+
If you need remote mute / kick semantics, route them through the **Chat SDK group APIs** (e.g. `CometChat.kickGroupMember` / `banGroupMember`) or the **REST API** for group membership, and treat "muted" as app-level state you broadcast over a custom/transient message and apply locally. The Calls SDK is not involved in moderation.
|
|
237
203
|
|
|
238
204
|
---
|
|
239
205
|
|
|
240
206
|
## Capacity error handling
|
|
241
207
|
|
|
208
|
+
`CallsEventsDelegate` has NO `onError` callback. Capacity / membership errors surface from the `onError` closures of `generateToken` and `startSession` as a `CometChatCallException` — handle them there:
|
|
209
|
+
|
|
242
210
|
```swift
|
|
243
211
|
final class GroupCallViewController: UIViewController {
|
|
244
|
-
func
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
default:
|
|
256
|
-
self?.showAlert(title: "Call error", message: error.message)
|
|
257
|
-
}
|
|
212
|
+
func handleStartError(_ error: CometChatCallException?) {
|
|
213
|
+
DispatchQueue.main.async { [weak self] in
|
|
214
|
+
switch error?.errorCode {
|
|
215
|
+
case "ERR_CALL_FULL":
|
|
216
|
+
self?.showAlert(title: "Call is full",
|
|
217
|
+
message: "This meeting has reached its participant limit.")
|
|
218
|
+
case "ERR_NOT_GROUP_MEMBER":
|
|
219
|
+
self?.showAlert(title: "Not a member",
|
|
220
|
+
message: "You're not a member of this group.")
|
|
221
|
+
default:
|
|
222
|
+
self?.showAlert(title: "Call error", message: error?.errorDescription ?? "Unknown error")
|
|
258
223
|
}
|
|
259
224
|
}
|
|
260
|
-
// ...
|
|
261
225
|
}
|
|
226
|
+
// Pass handleStartError to the onError of generateToken / startSession.
|
|
262
227
|
|
|
263
228
|
private func showAlert(title: String, message: String) {
|
|
264
229
|
let alert = UIAlertController(title: title, message: message, preferredStyle: .alert)
|
|
@@ -312,11 +277,9 @@ NotificationCenter.default.addObserver(
|
|
|
312
277
|
|
|
313
278
|
@objc func powerStateChanged() {
|
|
314
279
|
if ProcessInfo.processInfo.isLowPowerModeEnabled && callActive {
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
self.showBanner("Video paused — Low Power Mode")
|
|
319
|
-
}
|
|
280
|
+
CometChatCalls.videoPaused(true) // NOT pauseVideo; synchronous
|
|
281
|
+
DispatchQueue.main.async {
|
|
282
|
+
self.showBanner("Video paused — Low Power Mode")
|
|
320
283
|
}
|
|
321
284
|
}
|
|
322
285
|
}
|
|
@@ -1,37 +1,33 @@
|
|
|
1
1
|
# Idle timeout on iOS
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The iOS Calls SDK v5 has a real idle-timeout API. Set it on the builder with `setIdleTimeoutPeriod(_ value: Int) -> Self` (swiftinterface:289), and react to the timeout via the optional `CallsEventsDelegate.onSessionTimeout()` callback (swiftinterface:30). The SDK runs the timer; you do NOT hand-roll a client-side `Timer`. (If you want an "are you still there?" prompt BEFORE the SDK ends the session, you can still drive a softer client-side warning off participant events — but the timeout itself is the SDK's job.)
|
|
4
4
|
|
|
5
5
|
**Canonical docs:** https://www.cometchat.com/docs/calls/ios/idle-timeout
|
|
6
6
|
**Read first:** `cometchat-react-calls/references/idle-timeout.md` — settings + archetype timeouts + Pattern A custom timer.
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
## SDK
|
|
10
|
+
## SDK idle timeout — `setIdleTimeoutPeriod` + `onSessionTimeout`
|
|
11
|
+
|
|
12
|
+
Set the timeout (in seconds) on the builder, then react to the SDK's `onSessionTimeout()` callback. When it fires, report the end to CallKit and the SDK has already torn the session down:
|
|
11
13
|
|
|
12
14
|
```swift
|
|
13
15
|
import CometChatCallsSDK
|
|
14
16
|
|
|
15
17
|
let settings = CallSettingsBuilder()
|
|
16
|
-
.
|
|
17
|
-
.
|
|
18
|
-
.setIdleTimeoutPeriodBeforePrompt(60_000) // ms
|
|
19
|
-
.setIdleTimeoutPeriodAfterPrompt(120_000)
|
|
18
|
+
.setIdleTimeoutPeriod(120) // swiftinterface:289 setIdleTimeoutPeriod(_ value: Int) -> Self
|
|
19
|
+
.setDelegate(callListener)
|
|
20
20
|
.build()
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
Listener — implement on the `CometChatCallsEventsListener`:
|
|
21
|
+
// ... generateToken → startSession(callToken:callSetting:view:) ...
|
|
24
22
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
func
|
|
23
|
+
class CallListener: NSObject, CallsEventsDelegate {
|
|
24
|
+
// swiftinterface:30 — optional CallsEventsDelegate.onSessionTimeout()
|
|
25
|
+
func onSessionTimeout() {
|
|
28
26
|
DispatchQueue.main.async {
|
|
29
|
-
// Report end to CallKit (rule 1.5 — hangup cleanup)
|
|
30
|
-
CallManager.shared.endCall(reason: .
|
|
31
|
-
// Navigate away
|
|
27
|
+
// Report end to CallKit (rule 1.5 — hangup cleanup); SDK already ended the session.
|
|
28
|
+
CallManager.shared.endCall(reason: .remoteEnded)
|
|
32
29
|
}
|
|
33
30
|
}
|
|
34
|
-
// ...
|
|
35
31
|
}
|
|
36
32
|
```
|
|
37
33
|
|
|
@@ -41,7 +37,7 @@ The `CallManager.shared.endCall(reason:)` call is critical — see `references/c
|
|
|
41
37
|
|
|
42
38
|
## CallKit interaction — endCall reason
|
|
43
39
|
|
|
44
|
-
When
|
|
40
|
+
When your client-side timer fires, you must report the call end to CallKit. The reason matters for system UI:
|
|
45
41
|
|
|
46
42
|
```swift
|
|
47
43
|
let endReason: CXCallEndedReason = .remoteEnded
|
|
@@ -61,6 +57,8 @@ provider.reportCall(
|
|
|
61
57
|
|
|
62
58
|
Use `.remoteEnded` for idle timeout — it's the closest semantic match (the "remote" effectively ended the call by leaving). Don't use `.failed` (implies error; iOS shows a "call failed" UI).
|
|
63
59
|
|
|
60
|
+
Drive the reporting from your own timer's completion handler — there is no SDK callback to hang this off.
|
|
61
|
+
|
|
64
62
|
---
|
|
65
63
|
|
|
66
64
|
## Foreground/background gotcha
|
|
@@ -117,7 +115,7 @@ struct CallView: View {
|
|
|
117
115
|
.onTapGesture { /* prevent dismiss on backdrop */ }
|
|
118
116
|
IdleTimeoutPrompt(
|
|
119
117
|
onStay: { showIdlePrompt = false; resetIdleTimer() },
|
|
120
|
-
onEnd: {
|
|
118
|
+
onEnd: { CometChatCalls.endSession() },
|
|
121
119
|
)
|
|
122
120
|
}
|
|
123
121
|
}
|
|
@@ -143,7 +141,7 @@ alert.addAction(UIAlertAction(title: "Stay", style: .default) { _ in
|
|
|
143
141
|
resetIdleTimer()
|
|
144
142
|
})
|
|
145
143
|
alert.addAction(UIAlertAction(title: "End now", style: .destructive) { _ in
|
|
146
|
-
|
|
144
|
+
CometChatCalls.endSession()
|
|
147
145
|
})
|
|
148
146
|
alert.preferredAction = alert.actions.first // make Stay the default
|
|
149
147
|
present(alert, animated: true)
|
|
@@ -157,17 +155,18 @@ present(alert, animated: true)
|
|
|
157
155
|
|
|
158
156
|
Web sister reference rules apply, plus iOS-specific:
|
|
159
157
|
|
|
160
|
-
1.
|
|
161
|
-
2.
|
|
162
|
-
3. **
|
|
163
|
-
4.
|
|
158
|
+
1. **Hand-rolling a `Timer` for the timeout itself.** The SDK has `setIdleTimeoutPeriod(_:)` (swiftinterface:289) + `onSessionTimeout()` (swiftinterface:30) — use them. Only a soft "still there?" warning prompt should be client-side.
|
|
159
|
+
2. **`onSessionTimeout` firing without reporting end to CallKit.** Lock-screen call card persists — user sees a stuck "ongoing call" until they manually end it.
|
|
160
|
+
3. **Using `.failed` reason for idle timeout end.** iOS shows "call failed" — wrong semantic. Use `.remoteEnded`.
|
|
161
|
+
4. **Custom prompt that doesn't dim background.** Calls UI keeps rendering behind the prompt; user can interact with controls and call ends prematurely.
|
|
162
|
+
5. **`UIAlertController` from background queue.** Crashes — must be on main. Wrap in `DispatchQueue.main.async`.
|
|
164
163
|
|
|
165
164
|
---
|
|
166
165
|
|
|
167
166
|
## Verification checklist
|
|
168
167
|
|
|
169
|
-
- [ ] CallSettingsBuilder
|
|
170
|
-
- [ ] `
|
|
168
|
+
- [ ] Timeout set via `CallSettingsBuilder.setIdleTimeoutPeriod(_:)` (seconds) — no hand-rolled `Timer` for the timeout
|
|
169
|
+
- [ ] `onSessionTimeout()` delegate callback reports end to CallKit with `.remoteEnded` reason
|
|
171
170
|
- [ ] Custom prompt uses `accessibilityAddTraits(.isModal)` (SwiftUI) or `UIAlertController.preferredStyle = .alert`
|
|
172
171
|
- [ ] Backdrop dimmed; prevents accidental dismiss
|
|
173
172
|
- [ ] All UIKit alert presentations on main thread
|
|
@@ -1,33 +1,29 @@
|
|
|
1
1
|
# In-call chat on iOS
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> **The iOS Calls SDK v5 has NO in-call chat button.** There is no `setHideChatButton` on `CallSettingsBuilder`, no `onChatButtonClicked` callback on `CallsEventsDelegate`, and no `CometChatCalls.setChatButtonUnreadCount(_:)`. None of these symbols exist — do not emit them.
|
|
4
|
+
|
|
5
|
+
In-call chat is therefore an **app-level composition**, not an SDK feature: you add your OWN chat button to your call UI, and present a sheet hosting the kit's `CometChatMessageList` + `CometChatMessageComposer` over a group keyed to the call's session ID. The Calls SDK is not involved.
|
|
4
6
|
|
|
5
7
|
**Canonical docs:** https://www.cometchat.com/docs/calls/ios/in-call-chat
|
|
6
8
|
**Read first:** `cometchat-react-calls/references/in-call-chat.md` — group-as-session architecture + anti-patterns.
|
|
7
9
|
|
|
8
10
|
---
|
|
9
11
|
|
|
10
|
-
## SDK
|
|
12
|
+
## Your own chat button (the SDK provides none)
|
|
13
|
+
|
|
14
|
+
Add a button to your call control panel and present the sheet yourself. Track unread count in your own state (from a `CometChat.addMessageListener` on the session group) — there is no SDK badge API.
|
|
11
15
|
|
|
12
16
|
```swift
|
|
13
|
-
import CometChatCallsSDK
|
|
14
17
|
import CometChatSDK
|
|
15
18
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
// Chat button event — implement in your CometChatCallsEventsListener
|
|
22
|
-
func onChatButtonClicked() {
|
|
23
|
-
DispatchQueue.main.async {
|
|
24
|
-
self.presentChatSheet()
|
|
25
|
-
}
|
|
26
|
-
}
|
|
19
|
+
// In your call UIViewController:
|
|
20
|
+
let chatButton = UIButton(type: .system)
|
|
21
|
+
chatButton.addAction(UIAction { [weak self] _ in
|
|
22
|
+
self?.presentChatSheet() // present on main; you're already on main here
|
|
23
|
+
}, for: .touchUpInside)
|
|
27
24
|
|
|
28
|
-
// Unread badge
|
|
29
|
-
CometChatCalls.setChatButtonUnreadCount
|
|
30
|
-
CometChatCalls.setChatButtonUnreadCount(0)
|
|
25
|
+
// Unread badge: maintain your own count from a message listener on the session group,
|
|
26
|
+
// and update chatButton's badge view. There is no CometChatCalls.setChatButtonUnreadCount.
|
|
31
27
|
```
|
|
32
28
|
|
|
33
29
|
---
|
|
@@ -93,8 +89,8 @@ class InCallChatViewController: UIViewController {
|
|
|
93
89
|
|
|
94
90
|
override func viewWillDisappear(_ animated: Bool) {
|
|
95
91
|
super.viewWillDisappear(animated)
|
|
96
|
-
// Clear
|
|
97
|
-
|
|
92
|
+
// Clear YOUR unread count on close (no SDK badge API exists).
|
|
93
|
+
NotificationCenter.default.post(name: .inCallChatClosed, object: nil)
|
|
98
94
|
}
|
|
99
95
|
|
|
100
96
|
private func embedMessageList() {
|
|
@@ -155,8 +151,8 @@ Most apps don't need this; the kit's defaults are sensible. Override only if use
|
|
|
155
151
|
|
|
156
152
|
Web sister rules apply, plus iOS-specific:
|
|
157
153
|
|
|
158
|
-
1.
|
|
159
|
-
2. **`present(nav, animated: true)` from background queue.** Crash. Always main queue
|
|
154
|
+
1. **Wiring `setHideChatButton` / `onChatButtonClicked` / `setChatButtonUnreadCount`.** None exist on iOS v5. Present your own button + sheet; track unread in your own state.
|
|
155
|
+
2. **`present(nav, animated: true)` from background queue.** Crash. Always main queue.
|
|
160
156
|
3. **Mutating `group` from background.** `group` updates must be on main; `Task { @MainActor in ... }` or `DispatchQueue.main.async`.
|
|
161
157
|
4. **Forgetting `dismiss(animated: true)` on call end.** Sheet stays up over the post-call screen — looks broken.
|
|
162
158
|
|
|
@@ -164,8 +160,8 @@ Web sister rules apply, plus iOS-specific:
|
|
|
164
160
|
|
|
165
161
|
## Verification checklist
|
|
166
162
|
|
|
167
|
-
- [ ] `setHideChatButton
|
|
168
|
-
- [ ]
|
|
163
|
+
- [ ] Your OWN chat button presents the sheet (no `setHideChatButton`/`onChatButtonClicked`/`setChatButtonUnreadCount` — none exist)
|
|
164
|
+
- [ ] Sheet presented on main queue
|
|
169
165
|
- [ ] `UISheetPresentationController` with `[.medium(), .large()]` detents (iOS 15+)
|
|
170
166
|
- [ ] `CometChatMessageList` + `CometChatMessageComposer` embedded as child VCs
|
|
171
167
|
- [ ] Sheet dismissed on call end
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
# CometChat Calls iOS SDK v4 → v5 migration
|
|
2
2
|
|
|
3
|
-
`CometChatCallsSDK` v5
|
|
3
|
+
`CometChatCallsSDK` v5 keeps the same session model as v4 — a per-session call token, a `CallSettingsBuilder`, and a static `CometChatCalls` facade. There is **no** `CometChatCalls.login`, **no** `CallSession`/`CallSession.shared`, and **no** `SessionSettings` struct. Auth is per-session via `generateToken`.
|
|
4
4
|
|
|
5
5
|
**Canonical docs:** https://www.cometchat.com/docs/calls/ios/migration-guide-v5
|
|
6
6
|
|
|
7
|
+
> Every symbol below is verified against the v5 `CometChatCallsSDK` Swift interface. Do NOT introduce `CallSession`, `joinSession`, `SessionSettings`, `SessionSettingsBuilder`, `CometChatCallsEventsListener`, `muteAudio`/`pauseVideo`, `setLayout`, or `startScreenShare` — none of these exist in v5.
|
|
8
|
+
|
|
7
9
|
---
|
|
8
10
|
|
|
9
11
|
## Step 1 — Bump the SDK
|
|
@@ -22,111 +24,167 @@ pod install --repo-update
|
|
|
22
24
|
|
|
23
25
|
---
|
|
24
26
|
|
|
25
|
-
## Step 2 —
|
|
27
|
+
## Step 2 — Init
|
|
26
28
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
29
|
+
Init takes a `CallAppSettings` built with `CallAppSettingsBuilder`, passed under the `callsAppSettings:` label (note the `s` — `callsAppSettings`, not `callAppSettings`).
|
|
30
|
+
|
|
31
|
+
```swift
|
|
32
|
+
let callAppSettings = CallAppSettingsBuilder()
|
|
33
|
+
.setAppId("APP_ID")
|
|
34
|
+
.setRegion("REGION")
|
|
35
|
+
.build()
|
|
36
|
+
|
|
37
|
+
CometChatCalls.init(callsAppSettings: callAppSettings, onSuccess: { _ in
|
|
38
|
+
// ready
|
|
39
|
+
}, onError: { error in
|
|
40
|
+
// surface error
|
|
41
|
+
})
|
|
38
42
|
```
|
|
39
43
|
|
|
40
|
-
|
|
44
|
+
There is no async/await `init(with:)` form and no `CallAppSettings.Builder()` nested type — use `CallAppSettingsBuilder()`.
|
|
41
45
|
|
|
42
46
|
---
|
|
43
47
|
|
|
44
|
-
## Step 3 —
|
|
48
|
+
## Step 3 — Auth is per-session (no Calls SDK login)
|
|
49
|
+
|
|
50
|
+
> **There is NO `CometChatCalls.login` and NO `CometChatCalls.getLoggedInUser` in v5.** Do not call them — they do not exist on the Calls SDK.
|
|
51
|
+
|
|
52
|
+
Authentication is per call session. Get a call token immediately before starting a session:
|
|
45
53
|
|
|
46
54
|
```swift
|
|
47
|
-
//
|
|
48
|
-
let authToken =
|
|
49
|
-
|
|
55
|
+
// Chat SDK still owns the user session. Get its auth token from the Chat SDK:
|
|
56
|
+
let authToken = CometChat.getUserAuthToken() // CometChatSDK — User has NO `authToken` property
|
|
57
|
+
|
|
58
|
+
CometChatCalls.generateToken(authToken: authToken, sessionID: sessionID, onSuccess: { token in
|
|
59
|
+
// `token` is the call token you pass to startSession
|
|
60
|
+
}, onError: { error in
|
|
61
|
+
// surface error
|
|
62
|
+
})
|
|
50
63
|
```
|
|
51
64
|
|
|
52
|
-
|
|
65
|
+
`generateToken` is `CometChatCalls.generateToken(authToken:sessionID:onSuccess:onError:)`.
|
|
53
66
|
|
|
54
67
|
---
|
|
55
68
|
|
|
56
|
-
## Step 4 —
|
|
69
|
+
## Step 4 — Session settings (`CallSettingsBuilder`, not `SessionSettings`)
|
|
57
70
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
+ layout: .tile
|
|
70
|
-
+ )
|
|
71
|
+
> **There is NO `SessionSettings` struct and NO `SessionSettingsBuilder`.** Use `CallSettingsBuilder().build()` which returns `CallSettings`.
|
|
72
|
+
|
|
73
|
+
```swift
|
|
74
|
+
let callSettings = CallSettingsBuilder()
|
|
75
|
+
.setIsAudioOnly(false) // was setSessionType(.video) — there is no setSessionType
|
|
76
|
+
.setStartAudioMuted(false)
|
|
77
|
+
.setStartVideoMuted(false)
|
|
78
|
+
.setShowRecordingButton(true) // NOT inverted — there is no hideRecordingButton
|
|
79
|
+
.setMode(.default) // setMode(_ value: DisplayModes) — swiftinterface:281 (.default/.single/.spotlight); NSString overload is deprecated
|
|
80
|
+
.setDelegate(self) // self conforms to CallsEventsDelegate
|
|
81
|
+
.build()
|
|
71
82
|
```
|
|
72
83
|
|
|
84
|
+
There is no `setLayout`, no `setHideChatButton`, no `enableRecording`. Recording-button visibility is `setShowRecordingButton(_:)`; auto-record on start is `setStartRecordingOnCallStart(_:)`.
|
|
85
|
+
|
|
73
86
|
---
|
|
74
87
|
|
|
75
|
-
## Step 5 —
|
|
88
|
+
## Step 5 — Start / end the session
|
|
76
89
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
90
|
+
> **There is NO `joinSession` and NO `CallSession`.** The lifecycle is `generateToken` → `startSession` → `endSession`, all static on `CometChatCalls`.
|
|
91
|
+
|
|
92
|
+
```swift
|
|
93
|
+
// `view` is the UIView the SDK renders the call into.
|
|
94
|
+
CometChatCalls.startSession(callToken: token, callSetting: callSettings, view: callView, onSuccess: { _ in
|
|
95
|
+
// session started
|
|
96
|
+
}, onError: { error in
|
|
97
|
+
// surface error
|
|
98
|
+
})
|
|
99
|
+
|
|
100
|
+
// End the call:
|
|
101
|
+
CometChatCalls.endSession() // EXISTS in v5 — do not say it doesn't
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Step 6 — Events: `CallsEventsDelegate`, not `CometChatCallsEventsListener`
|
|
107
|
+
|
|
108
|
+
> **The listener protocol is `CallsEventsDelegate`.** `CometChatCallsEventsListener` does not exist. There is no `addEventListener(.someEnum)` granular-subscription API.
|
|
109
|
+
|
|
110
|
+
```swift
|
|
111
|
+
// v5: implement the CallsEventsDelegate protocol (callbacks are @objc optional).
|
|
112
|
+
// Prefer the TYPED forms below (swiftinterface:29-54); the NSDictionary/NSArray
|
|
113
|
+
// overloads still exist but are DEPRECATED.
|
|
114
|
+
extension MyCallController: CallsEventsDelegate {
|
|
115
|
+
func onSessionTimeout() { /* idle timeout — swiftinterface:30 */ }
|
|
116
|
+
func onCallEnded() { /* ... */ }
|
|
117
|
+
func onCallEndButtonPressed() { /* ... */ }
|
|
118
|
+
func onUserJoined(rtcUser: RTCUser) { /* swiftinterface:35 */ }
|
|
119
|
+
func onUserLeft(rtcUser: RTCUser) { /* swiftinterface:38 */ }
|
|
120
|
+
func onUserListChanged(rtcUsers: [RTCUser]) { /* swiftinterface:41 */ }
|
|
121
|
+
func onAudioModeChanged(mode: [CallAudioMode]) { /* swiftinterface:44 */ }
|
|
122
|
+
func onCallSwitchedToVideo(callSwitchedInfo: CallSwitchRequestInfo) { /* swiftinterface:47 */ }
|
|
123
|
+
func onUserMuted(rtcMutedUser: RTCMutedUser) { /* swiftinterface:50 */ }
|
|
124
|
+
func onRecordingToggled(recordingInfo: RTCRecordingInfo) { /* one callback — no Started/Stopped/Failed split — swiftinterface:53 */ }
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// Register either via the builder (setDelegate, Step 4) or:
|
|
128
|
+
CometChatCalls.addCallEventListener(observerId: "my-id", delegate: self)
|
|
93
129
|
```
|
|
94
130
|
|
|
131
|
+
There is no `onScreenShareStarted`/`onScreenShareEnded`, no `onChatButtonClicked`, no `onActiveSpeakerUpdated`, and no layout-change callback in v5.
|
|
132
|
+
|
|
95
133
|
---
|
|
96
134
|
|
|
97
|
-
## Step
|
|
135
|
+
## Step 7 — In-call control method names
|
|
98
136
|
|
|
99
137
|
```diff
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
+
|
|
138
|
+
- CometChatCalls.muteAudio(true) // phantom
|
|
139
|
+
+ CometChatCalls.audioMuted(true) // mute
|
|
140
|
+
+ CometChatCalls.audioMuted(false) // unmute
|
|
141
|
+
|
|
142
|
+
- CometChatCalls.pauseVideo(true) // phantom
|
|
143
|
+
+ CometChatCalls.videoPaused(true)
|
|
144
|
+
+ CometChatCalls.videoPaused(false)
|
|
145
|
+
|
|
146
|
+
CometChatCalls.switchCamera() // unchanged
|
|
147
|
+
|
|
148
|
+
- CometChatCalls.setMode(mode) // setMode is on CallSettingsBuilder, not the runtime facade
|
|
149
|
+
+ // layout is fixed at session start via CallSettingsBuilder.setMode(_:) — there is no runtime setLayout
|
|
103
150
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
151
|
+
CometChatCalls.startRecording() // recording control
|
|
152
|
+
CometChatCalls.stopRecording()
|
|
153
|
+
|
|
154
|
+
CometChatCalls.enterPIPMode() // PiP — NOT CallSession.shared.enablePictureInPictureLayout
|
|
155
|
+
CometChatCalls.exitPIPMode()
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Local screen-share initiation is **not** available on the iOS Calls SDK v5 — there is no `startScreenShare`.
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## Chat SDK signaling (ringing mode) — verify these too
|
|
163
|
+
|
|
164
|
+
```diff
|
|
165
|
+
- Call(receiverUid: uid, receiverType: .user, callType: .video)
|
|
166
|
+
+ Call(receiverId: uid, callType: .video, receiverType: .user) // CometChatSDK arg order
|
|
108
167
|
|
|
109
|
-
-
|
|
110
|
-
+
|
|
168
|
+
- callType: .voice
|
|
169
|
+
+ callType: .audio // CallType is .audio / .video / .audioVideo — there is no .voice
|
|
111
170
|
|
|
112
|
-
//
|
|
113
|
-
- CometChatCalls.setMode(mode)
|
|
114
|
-
+ CometChatCalls.setLayout(layout)
|
|
171
|
+
- CometChat.login(UID:..., authKey:...) // still correct; there is NO loginAsync
|
|
115
172
|
```
|
|
116
173
|
|
|
117
|
-
|
|
174
|
+
Call delegate is `CometChatCallDelegate` with two-param callbacks, e.g. `onIncomingCallReceived(incomingCall:error:)`; register with `CometChat.addCallListener(_:_:)` (positional labels).
|
|
118
175
|
|
|
119
176
|
---
|
|
120
177
|
|
|
121
178
|
## Verification checklist
|
|
122
179
|
|
|
123
|
-
- [ ] Podfile / Package.swift updated
|
|
180
|
+
- [ ] Podfile / Package.swift updated to `~> 5.0`
|
|
124
181
|
- [ ] `pod install --repo-update` (CocoaPods) or SwiftPM resolved cleanly
|
|
125
|
-
- [ ] `CometChatCalls.login
|
|
126
|
-
- [ ]
|
|
127
|
-
- [ ]
|
|
128
|
-
- [ ]
|
|
129
|
-
- [ ]
|
|
182
|
+
- [ ] NO `CometChatCalls.login` anywhere — auth is per-session via `generateToken`
|
|
183
|
+
- [ ] `CallSettingsBuilder().build()` used; no `SessionSettings`/`SessionSettingsBuilder`
|
|
184
|
+
- [ ] `CallsEventsDelegate` implemented; no `CometChatCallsEventsListener`, no `addEventListener(.enum)`
|
|
185
|
+
- [ ] Lifecycle is `generateToken` → `startSession` → `endSession`; no `joinSession`, no `CallSession.shared`
|
|
186
|
+
- [ ] Controls use `audioMuted`/`videoPaused`/`enterPIPMode`/`exitPIPMode`
|
|
187
|
+
- [ ] `Call(receiverId:callType:receiverType:)` arg order; `CallType` has no `.voice`
|
|
130
188
|
- [ ] Real-device smoke: incoming call from iPhone → answer → mute → end
|
|
131
189
|
|
|
132
190
|
---
|