@cometchat/skills 4.2.1 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +33 -12
- package/bin/install.js +59 -4
- package/package.json +14 -1
- package/skills/cometchat/SKILL.md +460 -77
- 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 +20 -2
- 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 +389 -9
- 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 +235 -293
- 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 +22 -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 +412 -13
- 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 +20 -2
- 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 +78 -63
- package/skills/cometchat-flutter-v6-calls/references/add-calls-to-existing-chat.md +8 -6
- 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 +348 -10
- 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 +43 -21
- package/skills/cometchat-flutter-v6-testing/SKILL.md +6 -6
- 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 +281 -11
- 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 +56 -18
- package/skills/cometchat-native-calls/SKILL.md +89 -19
- 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 +91 -57
- package/skills/cometchat-native-core/SKILL.md +281 -9
- package/skills/cometchat-native-customization/SKILL.md +150 -28
- package/skills/cometchat-native-expo-patterns/SKILL.md +77 -27
- package/skills/cometchat-native-features/SKILL.md +79 -49
- 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 +71 -3
- package/skills/cometchat-nextjs-patterns/SKILL.md +48 -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 +57 -4
- package/skills/cometchat-react-push/SKILL.md +258 -72
- package/skills/cometchat-react-router-patterns/SKILL.md +43 -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
|
@@ -43,20 +43,16 @@ Without these, share-invite URLs open in Safari instead of your app.
|
|
|
43
43
|
|
|
44
44
|
---
|
|
45
45
|
|
|
46
|
-
## SDK
|
|
46
|
+
## No SDK share-invite button — build your own
|
|
47
|
+
|
|
48
|
+
> The iOS Calls SDK v5 has **no** share-invite affordance. There is no `setHideShareInviteButton` on `CallSettingsBuilder` and no `onShareInviteButtonClicked` callback on `CallsEventsDelegate`. Share-invite is an app-level feature: add your own button to your call UI and present a `UIActivityViewController` over the session's deep link (below).
|
|
47
49
|
|
|
48
50
|
```swift
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
func onShareInviteButtonClicked() {
|
|
55
|
-
DispatchQueue.main.async {
|
|
56
|
-
self.shareCallInvite()
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
51
|
+
// Your own button in the call control panel:
|
|
52
|
+
let inviteButton = UIButton(type: .system)
|
|
53
|
+
inviteButton.addAction(UIAction { [weak self] _ in
|
|
54
|
+
self?.shareCallInvite() // already on main
|
|
55
|
+
}, for: .touchUpInside)
|
|
60
56
|
```
|
|
61
57
|
|
|
62
58
|
---
|
|
@@ -14,7 +14,7 @@ class ProfileViewController: UIViewController {
|
|
|
14
14
|
override func viewDidLoad() {
|
|
15
15
|
super.viewDidLoad()
|
|
16
16
|
|
|
17
|
-
let callButton =
|
|
17
|
+
let callButton = CometChatCallButtons(width: 100, height: 44).set(user: user) // class is plural; user via .set(user:), no (user:) init
|
|
18
18
|
callButton.translatesAutoresizingMaskIntoConstraints = false
|
|
19
19
|
view.addSubview(callButton)
|
|
20
20
|
NSLayoutConstraint.activate([
|
|
@@ -46,11 +46,11 @@ import CometChatUIKitSwift
|
|
|
46
46
|
struct CallButtonView: UIViewRepresentable {
|
|
47
47
|
let user: User
|
|
48
48
|
|
|
49
|
-
func makeUIView(context: Context) ->
|
|
50
|
-
|
|
49
|
+
func makeUIView(context: Context) -> CometChatCallButtons {
|
|
50
|
+
CometChatCallButtons(width: 100, height: 44).set(user: user)
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
func updateUIView(_ uiView:
|
|
53
|
+
func updateUIView(_ uiView: CometChatCallButtons, context: Context) {
|
|
54
54
|
// Re-bind on user change if your view supports that
|
|
55
55
|
}
|
|
56
56
|
}
|
|
@@ -3,13 +3,14 @@ name: cometchat-ios-components
|
|
|
3
3
|
description: "Complete catalog of CometChat iOS UI Kit v5 components with correct usage patterns from official documentation."
|
|
4
4
|
license: "MIT"
|
|
5
5
|
compatibility: "CometChatUIKitSwift ^5; CometChatSDK ^4; iOS 13+"
|
|
6
|
-
allowed-tools: "shell, file-read, file-search, file-list"
|
|
7
6
|
metadata:
|
|
8
7
|
author: "CometChat"
|
|
9
8
|
version: "3.0.0"
|
|
10
9
|
tags: "chat cometchat ios swift components catalog reference ui-kit"
|
|
11
10
|
---
|
|
12
11
|
|
|
12
|
+
> **Ground truth:** `CometChatUIKitSwift ~> 5` component catalog (Pods/SPM `.swiftinterface`) + `docs/ui-kit/ios`. **Official docs:** https://www.cometchat.com/docs/ui-kit/ios/components-overview · **Docs MCP:** `claude mcp add --transport http cometchat-docs https://www.cometchat.com/docs/mcp` (or fetch the URL directly without MCP). Verify symbols against the installed package/source before relying on them.
|
|
13
|
+
|
|
13
14
|
## Purpose
|
|
14
15
|
|
|
15
16
|
This is the single source of truth for CometChat iOS UI Kit v5 component names, properties, and usage patterns. All examples are based on official CometChat documentation.
|
|
@@ -33,9 +34,9 @@ let navController = UINavigationController(rootViewController: conversationsVC)
|
|
|
33
34
|
conversationsVC.set(onItemClick: { [weak navController] conversation, indexPath in
|
|
34
35
|
let messagesVC = MessagesVC() // your own VC composing CometChatMessageHeader + List + Composer; see cometchat-ios-components § 12
|
|
35
36
|
if let group = conversation.conversationWith as? Group {
|
|
36
|
-
messagesVC.
|
|
37
|
+
messagesVC.group = group
|
|
37
38
|
} else if let user = conversation.conversationWith as? User {
|
|
38
|
-
messagesVC.
|
|
39
|
+
messagesVC.user = user
|
|
39
40
|
}
|
|
40
41
|
navController?.pushViewController(messagesVC, animated: true)
|
|
41
42
|
})
|
|
@@ -72,7 +73,7 @@ let usersNav = UINavigationController(rootViewController: usersVC)
|
|
|
72
73
|
|
|
73
74
|
usersVC.set(onItemClick: { [weak usersNav] user, indexPath in
|
|
74
75
|
let messagesVC = MessagesVC() // your own VC composing CometChatMessageHeader + List + Composer; see cometchat-ios-components § 12
|
|
75
|
-
messagesVC.
|
|
76
|
+
messagesVC.user = user
|
|
76
77
|
usersNav?.pushViewController(messagesVC, animated: true)
|
|
77
78
|
})
|
|
78
79
|
```
|
|
@@ -135,7 +136,7 @@ let groupsNav = UINavigationController(rootViewController: groupsVC)
|
|
|
135
136
|
|
|
136
137
|
groupsVC.set(onItemClick: { [weak groupsNav] group, indexPath in
|
|
137
138
|
let messagesVC = MessagesVC() // your own VC composing CometChatMessageHeader + List + Composer; see cometchat-ios-components § 12
|
|
138
|
-
messagesVC.
|
|
139
|
+
messagesVC.group = group
|
|
139
140
|
groupsNav?.pushViewController(messagesVC, animated: true)
|
|
140
141
|
})
|
|
141
142
|
```
|
|
@@ -398,8 +399,8 @@ class MessagesVC: UIViewController {
|
|
|
398
399
|
return listView
|
|
399
400
|
}()
|
|
400
401
|
|
|
401
|
-
private lazy var composerView:
|
|
402
|
-
let composer =
|
|
402
|
+
private lazy var composerView: CometChatCompactMessageComposer = {
|
|
403
|
+
let composer = CometChatCompactMessageComposer()
|
|
403
404
|
composer.translatesAutoresizingMaskIntoConstraints = false
|
|
404
405
|
if let user = user {
|
|
405
406
|
composer.set(user: user)
|
|
@@ -444,7 +445,7 @@ class MessagesVC: UIViewController {
|
|
|
444
445
|
|
|
445
446
|
composerView.leadingAnchor.constraint(equalTo: view.leadingAnchor),
|
|
446
447
|
composerView.trailingAnchor.constraint(equalTo: view.trailingAnchor),
|
|
447
|
-
composerView.bottomAnchor.constraint(equalTo: view.
|
|
448
|
+
composerView.bottomAnchor.constraint(equalTo: view.bottomAnchor)
|
|
448
449
|
])
|
|
449
450
|
}
|
|
450
451
|
}
|
|
@@ -512,9 +513,9 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
|
|
|
512
513
|
conversationsVC.set(onItemClick: { [weak conversationsNav] conversation, indexPath in
|
|
513
514
|
let messagesVC = MessagesVC() // your own VC composing CometChatMessageHeader + List + Composer; see cometchat-ios-components § 12
|
|
514
515
|
if let group = conversation.conversationWith as? Group {
|
|
515
|
-
messagesVC.
|
|
516
|
+
messagesVC.group = group
|
|
516
517
|
} else if let user = conversation.conversationWith as? User {
|
|
517
|
-
messagesVC.
|
|
518
|
+
messagesVC.user = user
|
|
518
519
|
}
|
|
519
520
|
messagesVC.hidesBottomBarWhenPushed = true
|
|
520
521
|
conversationsNav?.pushViewController(messagesVC, animated: true)
|
|
@@ -542,7 +543,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
|
|
|
542
543
|
|
|
543
544
|
usersVC.set(onItemClick: { [weak usersNav] user, indexPath in
|
|
544
545
|
let messagesVC = MessagesVC() // your own VC composing CometChatMessageHeader + List + Composer; see cometchat-ios-components § 12
|
|
545
|
-
messagesVC.
|
|
546
|
+
messagesVC.user = user
|
|
546
547
|
messagesVC.hidesBottomBarWhenPushed = true
|
|
547
548
|
usersNav?.pushViewController(messagesVC, animated: true)
|
|
548
549
|
})
|
|
@@ -558,7 +559,7 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
|
|
|
558
559
|
|
|
559
560
|
groupsVC.set(onItemClick: { [weak groupsNav] group, indexPath in
|
|
560
561
|
let messagesVC = MessagesVC() // your own VC composing CometChatMessageHeader + List + Composer; see cometchat-ios-components § 12
|
|
561
|
-
messagesVC.
|
|
562
|
+
messagesVC.group = group
|
|
562
563
|
messagesVC.hidesBottomBarWhenPushed = true
|
|
563
564
|
groupsNav?.pushViewController(messagesVC, animated: true)
|
|
564
565
|
})
|
|
@@ -626,6 +627,193 @@ Renders URL link previews.
|
|
|
626
627
|
|
|
627
628
|
---
|
|
628
629
|
|
|
630
|
+
## 19. Additional v5 components
|
|
631
|
+
|
|
632
|
+
These components ship in `CometChatUIKitSwift` v5 and appear in the docs nav. Verify symbols against the kit source before use — never invent properties.
|
|
633
|
+
|
|
634
|
+
### 19.1 CometChatSearch
|
|
635
|
+
|
|
636
|
+
A `UIViewController` that searches across conversations and messages, with filter chips (Unread, Groups, Photos, Videos, Links, Documents, Audio). Push it inside a `UINavigationController` — it installs its own `UISearchController` into `navigationItem`.
|
|
637
|
+
|
|
638
|
+
**Usage:**
|
|
639
|
+
```swift
|
|
640
|
+
let searchVC = CometChatSearch()
|
|
641
|
+
searchVC.set(searchIn: [.conversations, .messages]) // SearchScope
|
|
642
|
+
searchVC.set(onConversationClicked: { conversation, indexPath in
|
|
643
|
+
// navigate to the conversation
|
|
644
|
+
})
|
|
645
|
+
searchVC.set(onMessageClicked: { message in
|
|
646
|
+
// jump to the message
|
|
647
|
+
})
|
|
648
|
+
navigationController?.pushViewController(searchVC, animated: true)
|
|
649
|
+
```
|
|
650
|
+
|
|
651
|
+
To scope a search to a single user or group, set `searchVC.user` or `searchVC.group` before pushing.
|
|
652
|
+
|
|
653
|
+
**Key Properties:**
|
|
654
|
+
| Property | Type | Description |
|
|
655
|
+
|---|---|---|
|
|
656
|
+
| `style` | `SearchStyle` | Visual styling |
|
|
657
|
+
| `searchScopes` | `[SearchScope]` | `.conversations`, `.messages` (also via `set(searchIn:)`) |
|
|
658
|
+
| `user` | `User?` | Scope search to one user |
|
|
659
|
+
| `group` | `Group?` | Scope search to one group |
|
|
660
|
+
| `hideUserStatus` | `Bool` | Hide online/offline indicator |
|
|
661
|
+
| `hideGroupType` | `Bool` | Hide private/protected group icon |
|
|
662
|
+
| `disableTyping` | `Bool` | Disable typing indicators |
|
|
663
|
+
|
|
664
|
+
**Callbacks:**
|
|
665
|
+
| Callback | Method | Description |
|
|
666
|
+
|---|---|---|
|
|
667
|
+
| `onConversationClicked` | `set(onConversationClicked:)` | Conversation result tapped |
|
|
668
|
+
| `onMessageClicked` | `set(onMessageClicked:)` | Message result tapped |
|
|
669
|
+
|
|
670
|
+
Filter configuration: `set(searchFilters:initialFilter:)` (takes `[SearchFilter]`).
|
|
671
|
+
|
|
672
|
+
---
|
|
673
|
+
|
|
674
|
+
### 19.2 CometChatNotificationFeed
|
|
675
|
+
|
|
676
|
+
A `UIViewController` (subclass of `CometChatListBase`) that renders an **in-app** notification feed — a scrollable list of `NotificationFeedItem` cards with category filter chips and unread counts. This is the in-app feed UI; it is **distinct from push notifications** (see `cometchat-ios-push` for FCM/APNs delivery). Push it inside a `UINavigationController`.
|
|
677
|
+
|
|
678
|
+
**Usage:**
|
|
679
|
+
```swift
|
|
680
|
+
// tier2-expect-error — CometChatNotificationFeed is verified real in the v5 UI Kit
|
|
681
|
+
// source (Components/Notification Feed/), but postdates the 5.1.13 Pods snapshot the
|
|
682
|
+
// Tier-2 harness compiles against. A fresh `pod 'CometChatUIKitSwift', '~> 5.1'`
|
|
683
|
+
// install resolves a newer 5.x that ships it.
|
|
684
|
+
let feedVC = CometChatNotificationFeed()
|
|
685
|
+
feedVC.set(showFilterChips: true)
|
|
686
|
+
feedVC.set(onItemClick: { feedItem in
|
|
687
|
+
// handle the tapped feed item
|
|
688
|
+
})
|
|
689
|
+
feedVC.set(onActionClick: { feedItem, actionEvent in
|
|
690
|
+
// handle a card action button (CometChatCardActionEvent)
|
|
691
|
+
})
|
|
692
|
+
navigationController?.pushViewController(feedVC, animated: true)
|
|
693
|
+
```
|
|
694
|
+
|
|
695
|
+
**Key Properties:**
|
|
696
|
+
| Property | Type | Description |
|
|
697
|
+
|---|---|---|
|
|
698
|
+
| `style` | `NotificationFeedStyle` | Visual styling (chips, cards, badges, timestamps) |
|
|
699
|
+
| `showFilterChips` | `Bool` | Show category filter chips (default `true`) |
|
|
700
|
+
| `showBackButton` | `Bool` | Show back button (default `true`) |
|
|
701
|
+
| `cardThemeMode` | `String` | Card theme mode, e.g. `"auto"` |
|
|
702
|
+
|
|
703
|
+
**Callbacks:**
|
|
704
|
+
| Callback | Method | Description |
|
|
705
|
+
|---|---|---|
|
|
706
|
+
| `onItemClick` | `set(onItemClick:)` | Feed item tapped (`NotificationFeedItem`) |
|
|
707
|
+
| `onActionClick` | `set(onActionClick:)` | Card action tapped (`CometChatCardActionEvent`) |
|
|
708
|
+
| `onError` | `set(onError:)` | Error occurred |
|
|
709
|
+
|
|
710
|
+
**Data operations:** `insert(feedItem:at:)`, `remove(feedItemId:)`, `clearList()`, `refresh()`, `size()`, `getFeedItems()`, `getUnreadCount()`. Custom fetch via `set(notificationFeedRequestBuilder:)` and `set(notificationCategoriesRequestBuilder:)`.
|
|
711
|
+
|
|
712
|
+
---
|
|
713
|
+
|
|
714
|
+
### 19.3 CometChatCompactMessageComposer
|
|
715
|
+
|
|
716
|
+
A `UIView` — the **compact variant of `CometChatMessageComposer`** (§ 6) — with built-in rich-text formatting (bold/italic/code/blockquote/lists via a `CometChatRichTextToolbar`). Use it where a single-line, space-constrained composer is needed. Same `set(user:)` / `set(group:)` data wiring as the standard composer.
|
|
717
|
+
|
|
718
|
+
**Usage:**
|
|
719
|
+
```swift
|
|
720
|
+
private lazy var compactComposer: CometChatCompactMessageComposer = {
|
|
721
|
+
let composer = CometChatCompactMessageComposer()
|
|
722
|
+
composer.translatesAutoresizingMaskIntoConstraints = false
|
|
723
|
+
if let user = user {
|
|
724
|
+
composer.set(user: user)
|
|
725
|
+
} else if let group = group {
|
|
726
|
+
composer.set(group: group)
|
|
727
|
+
}
|
|
728
|
+
composer.set(controller: self)
|
|
729
|
+
return composer
|
|
730
|
+
}()
|
|
731
|
+
```
|
|
732
|
+
|
|
733
|
+
**Key Properties / Configuration:**
|
|
734
|
+
| Member | Type | Description |
|
|
735
|
+
|---|---|---|
|
|
736
|
+
| `style` | `CompactMessageComposerStyle` | Visual styling |
|
|
737
|
+
| `set(placeholder:)` | `String` | Placeholder text |
|
|
738
|
+
| `set(maxLines:)` | `Int` | Max text length |
|
|
739
|
+
| `set(textFormatter:)` | `[CometChatTextFormatter]` | Text formatters (mentions, etc.) |
|
|
740
|
+
| `set(controller:)` | `UIViewController` | Hosting controller (call for attachments/sheets) |
|
|
741
|
+
| `disable(soundForMessages:)` | `Bool` | Disable message sounds |
|
|
742
|
+
| `disable(typingEvents:)` | `Bool` | Disable typing events |
|
|
743
|
+
| `disable(mentions:)` | `Bool` | Disable mentions |
|
|
744
|
+
|
|
745
|
+
**Callbacks:**
|
|
746
|
+
| Callback | Method | Description |
|
|
747
|
+
|---|---|---|
|
|
748
|
+
| `onSendButtonClick` | `set(onSendButtonClick:)` | Send tapped (`BaseMessage`) |
|
|
749
|
+
| `onTextChangedListener` | `set(onTextChangedListener:)` | Text changed (`String`) |
|
|
750
|
+
| `onError` | `set(onError:)` | Error occurred |
|
|
751
|
+
|
|
752
|
+
**Edit / reply:** `edit(message:)`, `reply(message:)`, `preview(message:mode:)` (`ComposerState`).
|
|
753
|
+
|
|
754
|
+
---
|
|
755
|
+
|
|
756
|
+
### 19.4 CometChatAIAssistanceChatHistory
|
|
757
|
+
|
|
758
|
+
A `UIViewController` that lists prior AI-assistant chat sessions (history) for a user or group, with a "New Chat" affordance. Push it inside a `UINavigationController`. (Note the class name spelling: `AIAssistance`; its style struct is `AiAssistantChatHistoryStyle`.)
|
|
759
|
+
|
|
760
|
+
**Usage:**
|
|
761
|
+
```swift
|
|
762
|
+
let historyVC = CometChatAIAssistanceChatHistory()
|
|
763
|
+
historyVC.set(user: user) // or set(group:)
|
|
764
|
+
historyVC.onMessageClicked = { message in
|
|
765
|
+
// open the selected AI chat
|
|
766
|
+
}
|
|
767
|
+
historyVC.onNewChatButtonClicked = { user in
|
|
768
|
+
// start a new AI chat
|
|
769
|
+
}
|
|
770
|
+
navigationController?.pushViewController(historyVC, animated: true)
|
|
771
|
+
```
|
|
772
|
+
|
|
773
|
+
**Key Properties:**
|
|
774
|
+
| Property | Type | Description |
|
|
775
|
+
|---|---|---|
|
|
776
|
+
| `style` | `AiAssistantChatHistoryStyle` | Visual styling |
|
|
777
|
+
| `user` | `User?` | History scope |
|
|
778
|
+
| `group` | `Group?` | History scope |
|
|
779
|
+
| `hideDateSeparator` | `Bool` | Hide date separators |
|
|
780
|
+
| `onMessageClicked` | `((BaseMessage) -> Void)?` | History row tapped |
|
|
781
|
+
| `onNewChatButtonClicked` | `((User) -> Void)?` | "New Chat" tapped |
|
|
782
|
+
|
|
783
|
+
**Configuration:** `set(user:parentMessage:withParent:)`, `set(group:parentMessage:)`, `set(messagesRequestBuilder:)`, plus `set(onError:)`, `set(onLoad:)`, `set(onEmpty:)`, `set(errorView:)`, `set(emptyView:)`, `set(loadingView:)`.
|
|
784
|
+
|
|
785
|
+
---
|
|
786
|
+
|
|
787
|
+
### 19.5 CometChatThreadedMessageHeader
|
|
788
|
+
|
|
789
|
+
A `UIView` that renders the parent message bubble plus the reply count at the top of a thread/reply screen. Compose it above a `CometChatMessageList` (configured with the parent message's thread) inside your own thread VC — analogous to how `CometChatMessageHeader` sits atop a chat screen (§ 4, § 12).
|
|
790
|
+
|
|
791
|
+
**Usage:**
|
|
792
|
+
```swift
|
|
793
|
+
private lazy var threadHeader: CometChatThreadedMessageHeader = {
|
|
794
|
+
let header = CometChatThreadedMessageHeader()
|
|
795
|
+
header.translatesAutoresizingMaskIntoConstraints = false
|
|
796
|
+
header.set(parentMessage: parentMessage)
|
|
797
|
+
header.set(count: parentMessage.replyCount)
|
|
798
|
+
header.set(controller: self)
|
|
799
|
+
return header
|
|
800
|
+
}()
|
|
801
|
+
```
|
|
802
|
+
|
|
803
|
+
**Key Properties:**
|
|
804
|
+
| Property | Type | Description |
|
|
805
|
+
|---|---|---|
|
|
806
|
+
| `style` | `ThreadedMessageHeaderStyle` | Visual styling |
|
|
807
|
+
| `maxHeight` | `CGFloat` | Max bubble area height (default `250`) |
|
|
808
|
+
| `messageAlignment` | `MessageListAlignment` | `.standard` or `.leftAligned` |
|
|
809
|
+
| `hideReceipt` | `Bool` | Hide read receipts |
|
|
810
|
+
| `hideReplyCount` | `Bool` | Hide the reply count |
|
|
811
|
+
| `hideReplyCountBar` | `Bool` | Hide the reply-count bar |
|
|
812
|
+
|
|
813
|
+
**Configuration:** `set(parentMessage:)`, `set(count:)`, `incrementCount()`, `reset()`, `set(templates:)`, `add(template:)`, `set(textFormatters:)`, `set(controller:)`.
|
|
814
|
+
|
|
815
|
+
---
|
|
816
|
+
|
|
629
817
|
## 18. SwiftUI Integration
|
|
630
818
|
|
|
631
819
|
Wrap UIKit components for SwiftUI:
|