cometchat-ios-components
The CometChat iOS UI Kit component catalogue — what each component is for, its real API shape, and where custom UI goes. Use when picking or customising an individual component. Triggers: 'which cometchat component', 'customise the conversation row', 'add a custom view to the message list', 'ios component list'.
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 1.6k
- Forks
- 491
01 前言 Front Matter
- name
- cometchat-ios-components
- license
- MIT
- metadata
- { "tags": "cometchat ios components swift uikit v5", "author": "CometChat", "version": "1.0.0" }
- description
- The CometChat iOS UI Kit component catalogue — what each component is for, its real API shape, and where custom UI goes. Use when picking or customising an individual component. Triggers: 'which cometchat component', 'customise the conversation row', 'add a custom view to the message list', 'ios component list'.
- compatibility
- CometChatUIKitSwift 5.2.3+ (Up to Next Major) · iOS 15.1+
03 SKILL.md 正文
Companion skills (read first)
cometchat-ios-coreowns install, credentials,init → login → renderand the golden-path chat surface. This skill ADDS the per-component catalogue; it never restates core's setup. Fetch exact API viacometchat-ios-core/references/docs-map.md.
Use this skill when
Choosing a component, or customising one: "what shows the member list?", "put a badge on the conversation row", "swap the message bubble".
The catalogue (catalog-verified — nothing else exists)
| Component | For |
|---|---|
CometChatConversations |
Recent-chats list · the usual entry point |
CometChatMessageHeader · CometChatMessageList · CometChatCompactMessageComposer |
The chat screen — you compose these three yourself |
CometChatUsers · CometChatGroups · CometChatGroupMembers |
Pickers and rosters |
CometChatSearch |
Global search over conversations and messages |
CometChatThreadedMessageHeader |
Thread parent header |
CometChatCallButtons · CometChatIncomingCall · CometChatOngoingCall · CometChatCallLogs |
Calling → cometchat-ios-calls |
CometChatAvatar · CometChatBadge · CometChatStatusIndicator · CometChatDate · CometChatReceipt |
Base building blocks |
CometChatMessageInformation · CometChatAIAssistanceChatHistory |
Per-message detail · AI history |
CometChatScopeChange |
Change a member's role. set(group:groupMember:), options: [(String, CometChat.MemberScope)] (property). Present it as a sheet. Through 5.1.22 its Cancel only called dismiss(), so a pushed one stranded the user; 5.2.3 pops when pushed (source), but presenting stays the safe default. CometChatGroupMembers already presents it on row tap. |
There is NO composite component.
CometChatMessages,CometChat{Users,Groups,Conversations}WithMessages,CometChatAddMembers,CometChatMessageHeaderOptionare v4 or non-existent — never emit them. If a symbol is not incatalogs/ios-v5.json, it does not exist in v5, whatever a page says.
Three API shapes — get this right or nothing compiles
- Setters return
Selfand are chainable:set(user:),set(onItemClick:),set(subtitle:). - Properties are assigned:
list.avatarStyle = ...,conversations.onSearchClick = { ... },groups.onSelectedItemProceed = { ... }. - Named setters —
setXxx(xxx:)with the label repeated:CometChatMessageInformationusessetSubtitle(subtitle:),setBubbleView(bubbleView:),setListItemView(listItemView:),setOnError(onError:). Writing them in shape-1 form (set(subtitle:)) does not compile on that component. Which is which is per component, and the kit is not consistent —CometChatConversationshasset(subtitleView:)/set(trailView:)whileCometChatUsersandCometChatGroupshaveset(subtitle:)/set(trailingView:), andCometChatGroupMembersuses the Conversations spelling. Never generalise a name across components — fetch the component's.mdtwin.
Where custom UI goes — IN the component's slot, never beside it
Every list component exposes: set(listItemView:) (whole row) · set(leadingView:) · set(titleView:) · subtitle · trailing · set(options:) (swipe/overflow actions). Use these instead of building your own row above the list.
Empty/error/loading are assignable views inherited from CometChatListBase: emptyStateView, errorStateView, loadingView, plus emptyStateTitleText / emptyStateSubTitleText to retitle the built-in one. CometChatSearch is the exception — it does NOT inherit CometChatListBase, so it has none of that chrome; it uses set(emptyView:) / set(errorView:) / set(loadingView:) instead.
Gotchas
set(controller:)on any component that presents something (header, list, composer) or its built-in affordances render and do nothing.CometChatAvatar— usesetAvatar(avatarUrl:with:)(itswith:name renders initials when no URL loads). There is noset(user:). On 5.1.19 to 5.1.22 an avatar given aUIImagethroughset(image:)orinit(image:)drew an empty circle (measured on 5.1.19: the kit repainted over it) and there was no no-arg init. 5.2.3 fixes both in source: a supplied image is kept (hasSuppliedImageinCometChatAvatar.swift) andCometChatAvatar()compiles. The image path has not been re-run on a device, so still prefersetAvatarfor user and group avatars.- Search slots are per result TYPE:
set(listItemViewForMessage:)plus...ForImage/Video/Audio/Document/Link/Conversation. There are no*ForMessagegranular (title/subtitle/leading/trailing) slots — those exist for conversations only, as properties.
Verify it works
The component renders at full size, its custom slot appears in the right place (inside the row, not above the list), and every rendered control does something when tapped.
04 同仓库更多 Skills
worktable-review-with-annotations
Create, inspect, reply to, update, or resolve situated Worktable annotations. Use when feedback belongs to a Doc section, block, text range, or HTML Doc, or when the user asks to address existing review feedback and coordinate a requested artifact edit.
worktable-find-and-synthesize-context
Find, assess, and synthesize context from Worktable Docs and Records. Use when the user asks what a workspace contains, wants workspace-backed research, needs current facts reconciled across artifacts, or requests a cited synthesis without changing workspace state.
worktable-create-or-update-docs
Create, edit, rename, or maintain narrative Worktable Docs. Use for plans, decisions, briefs, notes, research syntheses, and other durable prose when the user requests a new artifact or a safe update to an existing one.
worktable-create-or-manage-records
Organize repeated structured information as durable Worktable Records. Use for research datasets, inventories, directories, pipelines, trackers, and other collections whose items need identity, fields, filtering, links, validation, or individual updates.
worktable-create-or-manage-interactive-html
Create or improve durable visual and interactive artifacts in Worktable. Use for dashboards, trackers, calculators, mini apps, slide presentations, and other requests that benefit from a polished HTML Doc.
worktable-collaborate-threads
Read, answer, and hand off messages through durable Worktable threads with users or other authenticated participants. Use when the user asks to check addressed messages, reply to a participant, continue a thread, request another agent's help, wait briefly for a response, or watch for comments and messages sent to the agent.