Skip to main content
FieldValue
PackageCometChatUIKitSwift
ArchitectureComposite components replaced with modular components
ThemingDirect static property assignment on CometChatTheme and CometChatTypography
Key changesCometChatConversationsWithMessages → Individual components (CometChatConversations, CometChatMessageHeader, CometChatMessageList, CometChatMessageComposer)
Style propsRemoved — use native theming system with direct property access
Config propsRemoved — direct control over each component
The CometChat v5 iOS UI Kit introduces a modular architecture with smaller, focused components replacing composite components. This guide outlines the key differences and provides migration steps from v4 to v5.

Overview of Changes

Featurev4v5
ArchitectureComposite components (e.g., CometChatConversationsWithMessages)Modular components (CometChatConversations, CometChatMessageList, etc.)
ThemingCometChatTheme with Palette and Typography classesDirect static property assignment
CustomizationComplex configuration objectsDirect component properties and Swift APIs
Style PropsInline style propertiesNative theming system
Custom ViewsitemView, leadingView, trailingView, subtitleView, titleViewUnified naming convention across components

Integration

In v4, integration was straightforward due to composite components like CometChatConversationsWithMessages. This single component provided end-to-end functionality including listing conversations, handling clicks, loading messages, and supporting threaded messages. However, customization required deep understanding of internal flows, and configurations mixed custom view props, behavioral props, and style props. With v5, composite components are replaced with smaller, modular components:
  • CometChatConversations
  • CometChatMessageHeader
  • CometChatMessageList
  • CometChatMessageComposer
This modular approach makes integration more flexible. Each component has a well-defined purpose, and developers can customize behavior and styling directly via component properties and Swift APIs.
Learn how to build a complete messaging UI using the v5 UI Kit by following the Getting Started guide.

Components

v4 Components

CometChatConversationsWithMessagesCometChatUsersWithMessagesCometChatGroupsWithMessages
CometChatMessagesCometChatMessageHeaderCometChatMessageList
CometChatMessageComposerCometChatThreadedMessagesCometChatConversations
CometChatUsersCometChatGroupsCometChatContacts
CometChatDetailsCometChatGroupMembersCometChatAddMembers
CometChatBannedMembersCometChatTransferOwnershipCometChatMessageInformation
CometChatIncomingCallCometChatOngoingCallCometChatOutgoingCall
CometChatCallButtonsCometChatCallLogsCometChatCallLogDetails
CometChatCallLogHistory

v5 Components

CometChatConversationsCometChatUsersCometChatGroups
CometChatGroupMembersCometChatMessageHeaderCometChatMessageList
CometChatMessageComposerCometChatThreadedMessageHeaderCometChatIncomingCall
CometChatOutgoingCallCometChatCallButtonsCometChatCallLogs

Theming

v4 Theming

In v4, theming required instantiating multiple objects and passing them through constructors:
V4 UI Kit
let palette = Palette()
palette.set(background: .purple)
palette.set(accent: .cyan)
palette.set(primary: .green)
palette.set(error: .red)
palette.set(success: .yellow)
palette.set(secondary: .orange)

let family = CometChatFontFamily(
    regular: "CourierNewPSMT",
    medium: "CourierNewPS-BoldMT",
    bold: "CourierNewPS-BoldMT"
)
var typography = Typography()
typography.overrideFont(family: family)

let theme = CometChatTheme(typography: typography, palatte: palette)

v5 Theming

In v5, theming uses direct static property assignment:
V5 UI Kit
// Apply the global theme - typically in AppDelegate or SceneDelegate
CometChatTheme.primaryColor = UIColor.red
CometChatTheme.backgroundColor01 = .brown
CometChatTheme.backgroundColor02 = .green

// Apply custom typography
CometChatTypography.Body.regular = UIFont.systemFont(ofSize: 18, weight: .bold)
For detailed guidance on theming, refer to:

Properties

In v5, the approach to properties has been refined:
  • Style properties — Replaced by a native theming system based on direct property access
  • Configuration properties — Removed due to modular architecture; developers have direct control over each component
  • Custom view properties — Restructured for consistency with unified naming: itemView, leadingView, trailingView, subtitleView, titleView

Property Changes

Conversations

New Properties

NameTypeDescription
hideNavigationBarBoolHides or shows the navigation bar
hideSearchBoolHides the search bar
hideLoadingStateBoolHides the loading state indicator
hideDeleteConversationOptionBoolHides the option to delete a conversation
hideGroupTypeBoolHides the group type indicator
backgroundDrawableUIImageSets a background image
separatorColorUIColorSets the color of separators
separatorWidthCGFloatSets the width of separators
errorTextColorUIColorSets the color of error messages
lastMessageTextColorUIColorSets the color of the last message text
typingIndicatorColorUIColorSets the color of the typing indicator
dateTimeFormatterCometChatDateTimeFormatterCustomizes date/time display
set(OnItemLongClick:)MethodTriggered on long press
set(onEmpty:)MethodTriggered when list is empty

Renamed Properties

v4 Namev5 NameDescription
hide(error: Bool)hideErrorViewHides the error state view
show(backButton: Bool)hideBackButtonControls back button visibility (logic inverted)
hide(receipt: Bool)hideReceiptsHides message receipts
disable(userPresence: Bool)hideUserStatusHides online/offline status
setOnItemClickset(OnItemClick:)Triggered on click
setOnBackset(onBack:)Override back button action
setOnSelectionset(onSelection:)Triggered on selection
setOnErrorset(onError:)Override error action

Removed Properties

NameDescription
hide(separator: Bool)Replaced by style properties
disable(typing: Bool)Toggled typing indicator visibility
setDatePatternReplaced by dateTimeFormatter
protectedGroupIconIcon for password protected groups
sentIcon, deliveredIcon, readIconReceipt icons

Users

New Properties

NameTypeDescription
set(options:)(User) -> [CometChatUserOption]Custom options for each user
set(leadingView:)(User) -> UIViewCustom leading view
set(titleView:)(User) -> UIViewCustom title view
set(trailView:)(User) -> UIViewCustom trailing view
set(onEmpty:)() -> VoidTriggered when list is empty
hideErrorViewBoolHides the error state view
hideNavigationBarBoolHides the navigation bar
hideBackButtonBoolHides the back button
hideLoadingStateBoolHides loading indicator
hideUserStatusBoolHides online/offline status
hideSectionHeaderBoolHides section headers
hideSearchBoolHides the search bar

Renamed Properties

v4 Namev5 NameDescription
setListItemViewset(listItemView:)Custom list item view
setSubtitleViewset(subtitleView:)Custom subtitle view
setEmptyStateViewset(emptyView:)Custom empty state view
setErrorStateViewset(errorView:)Custom error state view
setOnItemClickset(onItemClick:)Triggered on click
setOnItemLongClickset(onItemLongClick:)Triggered on long press
setOnBackset(onBack:)Triggered on back press
setOnSelectionset(onSelection:)Triggered on selection
setOnErrorset(onError:)Triggered on error

Removed Properties

NameDescription
set(loadingStateView:)Set loading view icon size
hide(errorText:)Hide error text
show(backButton:)Toggle back button
set(searchIcon:)Set search icon
hide(search:)Toggle search box
hide(separator:)Hide divider
disable(userPresence:)Control online indicator
set(emptyStateText:)Custom empty text
set(errorStateText:)Custom error text
set(searchPlaceholder:)Search placeholder
set(title:mode:)Set title with display mode
setOnLoadTriggered when list is fetched

Groups

New Properties

NameTypeDescription
set(onSelection:)ClosureReturns selected groups
set(onEmpty:)ClosureTriggered when list is empty
setOnLoadClosureTriggered when list is fetched
listItemSelectedImageUIImageSelected checkbox image
listItemDeSelectedImageUIImageDeselected checkbox image
hideErrorViewBoolHides error state view
hideNavigationBarBoolHides navigation bar
hideSearchBoolHides search bar
hideBackButtonBoolHides back button
hideLoadingStateBoolHides loading indicator
set(leadingView:)(Group?) -> UIViewCustom leading view
set(titleView:)(Group?) -> UIViewCustom title view
set(trailView:)(Group?) -> UIViewCustom trailing view

Renamed Properties

v4 Namev5 NameDescription
SetOnItemClickset(onItemClick:)Triggered on click
SetOnItemLongClickset(OnItemLongClick:)Triggered on long press
SetOnErrorset(onError:)Triggered on error
SetOnBackset(onBack:)Triggered on back press
setListItemViewSetListItemViewCustom list item
setSubtitleViewSetSubTitleViewCustom subtitle view

Group Members

New Properties

NameTypeDescription
hideErrorBoolHides error state view
hideUserStatusBoolHides online/offline status
hideNavigationBarBoolHides navigation bar
hideLoadingStateBoolHides loading indicator
hideBackIconBoolHides back button
hideKickMemberOptionBoolHides kick member option
hideBanMemberOptionBoolHides ban member option
hideScopeChangeOptionBoolHides scope change option
hideSearchBoolHides search bar
set(onSelection:)([GroupMember]) -> VoidReturns selected members
set(onEmpty:)() -> VoidTriggered when list is empty
set(onLoad:)([GroupMember]) -> VoidTriggered when list is fetched
set(leadingView:)(GroupMember?) -> UIViewCustom leading view
set(titleView:)(GroupMember?) -> UIViewCustom title view

Renamed Properties

v4 Namev5 NameDescription
backgroundbackgroundColorBackground color
disable(userPresence:)hideUserStatusHides online/offline status
hide(search:)hideSearchHides search bar
setOnItemClickset(onItemClick:)Triggered on click
setOnItemLongClickset(onItemLongClick:)Triggered on long press
setOnErrorset(onError:)Triggered on error
setOnBackset(onBack:)Triggered on back press

Removed Properties

NameDescription
backIconTintBack button tint color
searchIconTintSearch icon tint color
avatarStyleAvatar component styles
statusIndicatorStyleStatus indicator styles
listItemStyleList item view styles
groupScopeStyleChange scope component styles
groupMembersStyleComponent styles
set(title:mode:)Custom title
set(backButtonTitle:)Back button text
set(searchPlaceholder:)Search placeholder
show(backButton:)Show back button
set(errorStateText:)Error state text
selectionMode(mode:)Selection mode
hide(separator:)Hide separator

Message Header

New Properties

NameTypeDescription
titleTextColorUIColorHeader title text color
titleTextFontUIFontHeader title font
subtitleTextColorUIColorSubtitle text color
subtitleTextFontUIFontSubtitle font
backButtonImageTintColorUIColorBack button tint
hideBackButtonBoolHides back button
hideUserStatusBoolHides user status
hideVideoCallButtonBoolHides video call button
hideVoiceCallButtonBoolHides voice call button
set(onBack:)() -> VoidTriggered on back press
set(onError:)(CometChatException) -> VoidTriggered on error
set(listItemView:)(User?, Group?) -> UIViewCustom list item
set(leadingView:)(User?, Group?) -> UIViewCustom leading view
set(titleView:)(User?, Group?) -> UIViewCustom title view
set(trailView:)(User?, Group?) -> UIViewCustom trailing view
set(subtitleView:)(User?, Group?) -> UIViewCustom subtitle view
dateTimeFormatterCometChatDateTimeFormatterDate/time formatting

Renamed Properties

v4 Namev5 NameDescription
backgroundbackgroundColorBackground color
backIconTintbackButtonImageTintColorBack button tint
hide(backButton:)hideBackButtonHides back button
set(disableUsersPresence:)hideUserStatusHides user status
setMenusset(menus:)Custom menus
setSubtitleViewset(subtitleView:)Custom subtitle view

Removed Properties

NameDescription
typingIndicatorTextFontTyping indicator font
typingIndicatorTextColorTyping indicator color
detailIconTintDetail icon tint
onlineStatusColorOnline status color
set(protectedGroupIcon:)Protected group icon
set(privateGroupIcon:)Private group icon
disable(typing:)Enable/disable typing indicators

Message List

New Properties

NameTypeDescription
hideAvatarBoolHides sender avatar
hideGroupActionMessagesBoolHides group action messages
hideReplyInThreadOptionBoolHides reply in thread option
hideTranslateMessageOptionBoolHides translation option
hideEditMessageOptionBoolHides edit option
hideDeleteMessageOptionBoolHides delete option
hideReactionOptionBoolHides reaction option
hideMessagePrivatelyOptionBoolHides message privately option
hideCopyMessageOptionBoolHides copy option
hideMessageInfoOptionBoolHides message info option
hideHeaderViewBoolHides header view
hideFooterViewBoolHides footer view
hideDateSeparatorBoolHides date separator
scrollToBottomOnNewMessagesBoolScrolls to bottom on new messages
hideReceiptsBoolHides read receipts
disableSoundForMessagesBoolDisables message sound
hideEmptyViewBoolHides empty state view
hideErrorViewBoolHides error view
hideLoadingViewBoolHides loading view
hideNewMessageIndicatorBoolHides new message indicator
set(onThreadRepliesClick:)(BaseMessage, CometChatMessageTemplate) -> VoidThread click callback
set(onReactionClick:)(CometChat.ReactionCount, BaseMessage?) -> VoidReaction click callback
set(onError:)(CometChatException) -> VoidError callback
set(onEmpty:)() -> VoidEmpty state callback
set(onLoad:)([BaseMessage]) -> VoidLoad callback
set(headerView:)UIViewCustom header view
set(footerView:)UIViewCustom footer view
set(textFormatters:)[CometChatTextFormatter]Text formatters
dateTimeFormatterCometChatDateTimeFormatterDate/time formatting

Renamed Properties

v4 Namev5 NameDescription
hide(receipt:)hideReceiptsHides receipts
show(avatar:)hideAvatarShows/hides avatar
backgroundbackgroundColorBackground color
alignmentset(messageAlignment:)Message alignment

Removed Properties

NameDescription
loadingIconTintLoading icon tint
emptyTextFontEmpty state text font
errorTextFontError text font
emptyTextColorEmpty state text color
errorTextColorError state text color
nameTextColorSender name text color
nameTextFontSender name font
timestampTextColorTimestamp text color
threadReplySeperatorColorThread reply separator color
threadReplyTextColorThread reply text color
threadReplyTextFontThread reply font
hide(error:)Hide error view
messageInformationConfigurationMessage info configuration
reactionsConfigurationReactions configuration
setDateSeparatorPatternDate separator pattern
setDatePatternDate pattern

Message Composer

New Properties

NameTypeDescription
placeHolderTextFontUIFontPlaceholder font
placeHolderTextColorUIColorPlaceholder color
textFiledColorUIColorInput text color
textFiledFontUIFontInput text font
sendButtonImageUIImageSend button icon
sendButtonImageTintUIColorSend button tint
activeSendButtonImageBackgroundColorUIColorActive send button background
inactiveSendButtonImageBackgroundColorUIColorInactive send button background
attachmentImageUIImageAttachment button icon
attachmentImageTintUIColorAttachment button tint
voiceRecordingImageUIImageVoice recording icon
voiceRecordingImageTintUIColorVoice recording tint
aiImageUIImageAI button icon
aiImageTintUIColorAI button tint
stickerImageUIImageSticker button icon
stickerTintUIColorSticker button tint
disableTypingEventsBoolDisables typing indicators
disableMentionsBoolDisables mentions
hideImageAttachmentOptionBoolHides image attachment
hideVideoAttachmentOptionBoolHides video attachment
hideAudioAttachmentOptionBoolHides audio attachment
hideFileAttachmentOptionBoolHides file attachment
hidePollsOptionBoolHides polls option
hideCollaborativeDocumentOptionBoolHides collaborative document
hideCollaborativeWhiteboardOptionBoolHides collaborative whiteboard
hideAttachmentButtonBoolHides attachment button
hideVoiceRecordingButtonBoolHides voice recording button
hideStickersButtonBoolHides stickers button
hideSendButtonBoolHides send button
set(onSendButtonClick:)(BaseMessage) -> VoidSend button callback
set(onTextChangedListener:)(String) -> VoidText change callback
set(onError:)(CometChatException) -> VoidError callback
set(attachmentOptions:)(User?, Group?, UIViewController?) -> [CometChatMessageComposerAction]Custom attachment options
set(sendButtonView:)(User?, Group?) -> UIViewCustom send button
set(headerView:)(User?, Group?) -> UIViewCustom header view
set(footerView:)(User?, Group?) -> UIViewCustom footer view
set(textFormatter:)[CometChatTextFormatter]Text formatters
mediaRecorderStyleMediaRecorderStyleMedia recording styling
aiOptionsStyleAIOptionsStyleAI options styling

Renamed Properties

v4 Namev5 NameDescription
backgroundbackgroundColorBackground color
hide(voiceRecording:)hideVoiceRecordingButtonHides voice recording
disable(disableTypingEvents:)disableTypingEventsDisables typing events
disable(disableSoundForMessages:)disableSoundForMessagesDisables message sound
setMentionsFormattersset(textFormatter:)Text formatters

Removed Properties

NameDescription
inputBackgroundInput background color
textFontInput text font
inputBoxPlaceholderFontPlaceholder font
attachmentIconTintAttachment icon tint
sendIconTintSend icon tint
separatorTintSeparator color
inputBorderWidthInput border width
inputBorderColorInput border color
actionSheetTitleColorAction sheet title color
actionSheetTitleFontAction sheet title font
voiceRecordingIconTintVoice recording icon tint
aiIconTintAI icon tint
set(background:)Background color
set(placeholderText:)Placeholder text
set(maxLines:)Max lines
set(auxiliaryButtonAlignment:)Auxiliary button position
set(customSoundForMessage:)Custom message sound
set(liveReactionIconURL:)Live reaction icon
set(disableMentions:)Disable mentions
setOnSendButtonClickSend button callback
hide(liveReaction:)Hide live reaction
hide(footerView:)Hide footer view
hide(headerView:)Hide header view
hide(sendButton:)Hide send button
setAttachmentOptionsAttachment options
setAuxilaryButtonViewAuxiliary button view
setSecondaryButtonViewSecondary button view
setSendButtonViewSend button view

Next Steps

Getting Started

Fresh v5 setup guide for iOS

Components Overview

Explore all v5 prebuilt UI components

Theme Introduction

New direct property-based theming system

Color Resources

Customize colors and dark mode