Overview
CometChatCallLogs is a Component that shows the list of Call Log available . By default, names are shown for all listed users, along with their avatar if available.

Call Logs component is composed of the following BaseComponents:
| Components | Description |
|---|---|
| CometChatListBase | CometChatListBase is a container component featuring a title, customizable background options, and a dedicated list view for seamless integration within your application’s interface. |
| CometChatListItem | This component displays data retrieved from a CallLog object on a card, presenting a title and subtitle. |
Usage
Integration
CometChatCallLogs being a custom view controller, offers versatility in its integration. It can be seamlessly launched via button clicks or any user-triggered action, enhancing the overall user experience and facilitating smoother interactions within the application.
- Swift
Actions
Actions dictate how a component functions. They are divided into two types: Predefined and User-defined. You can override either type, allowing you to tailor the behavior of the component to fit your specific needs.1. OnItemClick
This method proves valuable when users seek to override onItemClick functionality within CometChatCallLogs, empowering them with greater control and customization options. ThesetOnItemClick action doesn’t have a predefined behavior. You can override this action using the following code snippet.
- Swift
2. OnError
You can customize this behavior by using the provided code snippet to override theOn Error and improve error handling.
- Swift
Filters
Filters allow you to customize the data displayed in a list within a Component. You can filter the list based on your specific criteria, allowing for a more customized. Filters can be applied using RequestBuilders of Chat SDK.1. CallRequestBuilder
The callRequestBuilder enables you to filter and customize the call list based on available parameters in callRequestBuilder. This feature allows you to create more specific and targeted queries during the call. The following are the parameters available in callRequestBuilder| Method | Description | Code |
|---|---|---|
| fetchPrevious | Fetches previous call logs | fetchPrevious(authToken: String, onSuccess: (([CallLog]) -> Void), onError: (_ error: CometChatCallException?) -> Void) |
| fetchNext | Fetches next call logs | fetchNext(onSuccess: (([CallLog]) -> Void), onError: (_ error: CometChatCallException?) -> Void) |
| limit | Sets the limit for the call logs request | .set(limit: Int) |
| callType | Sets the call type for the call logs request | .set(callType: CallType) |
| callStatus | Sets the call status for the call logs request | .set(callStatus: CallStatus) |
| hasRecording | Sets the recording status for the call logs request | .set(hasRecording: Bool) |
| callDirection | Sets the call direction for the call logs request | .set(callDirection: CallDirection) |
| uid | Sets the user ID for the call logs request | .set(uid: String) |
| guid | Sets the group ID for the call logs request | .set(guid: String) |
| authToken | Sets the auth token for the call logs request | .set(authToken: String?) |
| build | Builds the call logs request | .build() |
- Swift
Events
Events are emitted by aComponent. By using event you can extend existing functionality. Being global events, they can be applied in Multiple Locations and are capable of being Added or Removed.
The Call Logs component does not have any exposed events.
Customization
To fit your app’s design requirements, you can customize the appearance of the conversation component. We provide exposed methods that allow you to modify the experience and behavior according to your specific needs.Style
Using Style you can customize the look and feel of the component in your app, These parameters typically control elements such as the color, size, shape, and fonts used within the component.1. CallLog Style
You can customize the appearance of theCallLog Component by applying the CallLogStyle to it using the following code snippet.

- Swift
| Property | Description | Code |
|---|---|---|
| callStatusTextFont | Sets the call status font | .set(callStatusTextFont: UIFont) |
| missedCallTitleTint | Sets the missed call color | .set(missedCallTitleTint: UIColor) |
| callTimeTextFont | Sets the call time font | .set(callTimeTextFont: UIFont) |
| dateSeparatorTextFont | Sets the date separator font | .set(dateSeparatorTextFont: UIFont) |
| emptyStateTextFon | Sets the empty state font | .set(emptyStateTextFont: UIFont) |
| errorStateTextFont | Sets the error state font | .set(errorStateTextFont: UIFont) |
| callStatusTextColor | Sets the call status color | .set(callStatusTextColor: UIColor) |
| callStatusIconTint | Sets the call status icon tint | .set(callStatusIconTint: UIColor) |
| callTimeTextColor | Sets the call time color | .set(callTimeTextColor: UIColor) |
| dateSeparatorTextColor | Sets the date separator color | .set(dateSeparatorTextColor: UIColor) |
| missedCallIconTint | Sets the missed call icon tint | .set(missedCallIconTint: UIColor) |
| outgoingCallIconTint | Sets the outgoing call icon tint | .set(outgoingCallIconTint: UIColor) |
| incomingCallIconTint | Sets the incoming call icon tint | .set(incomingCallIconTint: UIColor) |
| emptyStateTextColor | Sets the empty state color | .set(emptyStateTextColor: UIColor) |
| errorStateTextColor | Sets the error state color | .set(errorStateTextColor: UIColor) |
| infoIconTint | Sets the info icon tint | .set(infoIconTint: UIColor) |
2. Avatar Styles
To apply customized styles to theAvatar component in the CallLogs Component, you can use the following code snippet. For further insights on Avatar Styles refer
- Swift
Swift
3. ListItem Styles
To apply customized styles to theListItemStyle component in the CallLogs Component, you can use the following code snippet. For further insights on ListItemStyle Styles refer

- Swift
Swift
Ensure to pass and present
CometChatCallLogs. If a navigation controller is already in use, utilize the pushViewController function instead of directly presenting the view controller.Functionality
These are a set of small functional customizations that allow you to fine-tune the overall experience of the component. With these, you can change text, set custom icons, and toggle the visibility of UI elements.- Swift
| Property | Description | Code |
|---|---|---|
| backButtonFont | Sets the font for the back button | .set(backButtonFont: UIFont?) |
| backButtonIcon | Sets the icon for the back button | .set(backButtonIcon: UIImage) |
| backButtonTint | Sets the tint for the back button | .set(backButtonTint: UIColor) |
| backButtonTitle | Sets the title for the back button | .set(backButtonTitle: String?) |
| backButtonTitleColor | Sets the title color for the back button | .set(backButtonTitleColor: UIColor) |
| background | Sets the background | .set(background: [CGColor]?) |
| borderColor | Sets the border color | .set(borderColor: UIColor) |
| borderWidth | Sets the border width | .set(borderWidth: CGFloat) |
| corner | Sets the corner style | .set(corner: CometChatCornerStyle) |
| emptyStateText | Sets the text for empty state | .set(emptyStateText: String) |
| emptyStateTextFont | Sets the font for empty state text | .set(emptyStateTextFont: UIFont) |
| errorStateText | Sets the text for error state | .set(errorStateText: String) |
| errorStateTextColor | Sets the text color for error state | .set(errorStateTextColor: UIColor) |
| errorStateTextFont | Sets the font for error state text | .set(errorStateTextFont: UIFont) |
| largeTitleColor | Sets the color for large title | .set(largeTitleColor: UIColor) |
| largeTitleFont | Sets the font for large title | .set(largeTitleFont: UIFont) |
| searchBackground | Sets the background for the search bar | .set(searchBackground: UIColor) |
| searchBarHeight | Sets the height for the search bar | .set(searchBarHeight: CGFloat) |
| searchBorderColor | Sets the border color for the search bar | .set(searchBorderColor: UIColor) |
| searchCancelButtonFont | Sets the font for the search cancel button | .set(searchCancelButtonFont: UIFont) |
| searchCancelButtonTint | Sets the tint for the search cancel button | .set(searchCancelButtonTint: UIColor) |
| searchClearIcon | Sets the icon for the search clear button | .set(searchClearIcon: UIImage) |
| searchCornerRadius | Sets the corner radius for the search bar | .set(searchCornerRadius: CometChatCornerStyle) |
| searchIcon | Sets the icon for the search bar | .set(searchIcon: UIImage?) |
| searchPlaceholder | Sets the placeholder for the search bar | .set(searchPlaceholder: String) |
| searchTextColor | Sets the color for the search text | .set(searchTextColor: UIColor) |
| searchTextFont | Sets the font for the search text | .set(searchTextFont: UIFont) |
| title | Sets the title for the title bar | .set(title: String, mode: UINavigationItem.LargeTitleDisplayMode) |
| titleColor | Sets the color for the title | .set(titleColor: UIColor) |
| titleFont | Sets the font for the title | .set(titleFont: UIFont) |
| hide errorText | Hides the error text | .hide(errorText: Bool) |
| hide search | Hides the search bar | .hide(search: Bool) |
| hide separator | Hides the separator | .hide(separator: Bool) |
Advanced
For advanced-level customization, you can set custom views to the component. This lets you tailor each aspect of the component to fit your exact needs and application aesthetics. You can create and define your views, layouts, and UI elements and then incorporate those into the component.EmptyView report
You can set a custom EmptyView using.set(emptyView: UIView) to match the empty view of your app.
- Swift
Custom_Empty_State_GroupViewa UIView file.
- Swift
Ensure to pass and present
CometChatCallLogs. If a navigation controller is already in use, utilize the pushViewController function instead of directly presenting the view controller.ErrorView report
You can set a custom ErrorView using.set(errorView: UIView) to match the error view of your app.
- Swift
Custom_ErrorState_GroupView and pass it inside the .set(errorView: UIView) method.
Custom_ErrorState_GroupView
- Swift
Ensure to pass and present
CometChatCallLogs. If a navigation controller is already in use, utilize the pushViewController function instead of directly presenting the view controller.Menus
You can set the Custom Menus to add more options to the CometChatCallLogs component.- Swift
- You can customize the menus for CometChatCallLogs to meet your requirements

CometChatCallLogs, enhancing its interface with a personalized menu for a more user-friendly experience.
- Swift
Ensure to pass and present
CometChatCallLogs. If a navigation controller is already in use, utilize the pushViewController function instead of directly presenting the view controller.