> ## Documentation Index
> Fetch the complete documentation index at: https://cometchat-22654f5b-feature-react-native-sdk-quotedmessage-a.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# CometChat UIKit iOS — Call Log Details

Learn how to integrate and customize CometChat’s call log components to display call history, participant details, and call recordings in your iOS UIKit chat app.

## Overview

The `CallLogDetailsVC` module provides a tabbed interface to view details of past calls:

* **History:** Chronological join/leave events.
* **Participants:** Users who joined the call.
* **Recordings:** Links to cloud-hosted call recordings.

This ensures transparency and auditability for both users and admins.

## Prerequisites

* A UIKit-based iOS project.
* **CometChatSDK**, **CometChatCallsSDK**, and **CometChatUIKitSwift** integrated.
* Active internet connection.
* A valid, logged-in CometChat user.

## Components

| Component                  | Role                                                               |
| -------------------------- | ------------------------------------------------------------------ |
| `CallLogDetailsVC`         | Main container with segmented control and page view.               |
| `CallLogParticipantsVC`    | Displays a list of users who participated in the call.             |
| `CallLogHistoryVC`         | Shows join/leave history entries with timestamps and statuses.     |
| `CallLogRecordingsVC`      | Lists call recordings with playback actions.                       |
| `CallLogDetailsHeaderView` | Header view showing call metadata (title, status, duration).       |
| `CallLogUserCell`          | UITableViewCell for participants, history, and recordings entries. |
| `CallLogDetailsModel`      | Data model formatting participants, history, and recordings data.  |
| `CallLogViewModel`         | Fetches and distributes call log data to the UI components.        |

## Integration Steps

### 1. Present Call Log Details Screen

Show the call log interface for a selected call.

```swift theme={null}
let detailsVC = CallLogDetailsVC(call: call)
navigationController?.pushViewController(detailsVC, animated: true)
```

**File reference:**\
[`CallLogDetailsVC.swift`](https://github.com/cometchat/cometchat-uikit-ios/blob/v5/SampleApp/View%20Controllers/CometChat%20Components/Call%20Log%20Details/CallLogDetailsVC.swift)

Bundles history, participants, and recordings into a single UI flow.

### 2. Display Participants List

Populate the participants tab with the call’s members.

```swift theme={null}
participantsTableView.reloadData()
```

**File reference:**\
[`CallLogParticipantsVC.swift`](https://github.com/cometchat/cometchat-uikit-ios/blob/v5/SampleApp/View%20Controllers/CometChat%20Components/Call%20Log%20Details/Call%20Participants/CallLogParticipantsVC.swift)

Audits who was present in the call.

### 3. Show Call History

Render join/leave activities in chronological order.

```swift theme={null}
history.append(CallHistoryEntry(...))
tableView.reloadData()
```

**File references:**

* [`CallHistoyTVC.swift`](https://github.com/cometchat/cometchat-uikit-ios/blob/v5/SampleApp/View%20Controllers/CometChat%20Components/Call%20Log%20Details/Call%20History%20/CallHistoyTVC.swift)
* [`CallLogHistoryVC.swift`](https://github.com/cometchat/cometchat-uikit-ios/blob/v5/SampleApp/View%20Controllers/CometChat%20Components/Call%20Log%20Details/Call%20History%20/CallLogHistoryVC.swift)

Tracks user join/leave times for transparency.

### 4. List and Play Recordings

Provide playback links for any recorded calls.

```swift theme={null}
UIApplication.shared.open(url)
```

**File references:**

* [`CallLogRecordingsVC.swift`](https://github.com/cometchat/cometchat-uikit-ios/blob/v5/SampleApp/View%20Controllers/CometChat%20Components/Call%20Log%20Details/Call%20Recording%20/CallLogRecordingsVC.swift)
* [`CallRecordingTVC.swift`](https://github.com/cometchat/cometchat-uikit-ios/blob/v5/SampleApp/View%20Controllers/CometChat%20Components/Call%20Log%20Details/Call%20Recording%20/CallRecordingTVC.swift)

Enables admins and users to review call content (if recording enabled).

## Customization Options

* **Styling:** Customize colors, fonts, and spacing via `CometChatTheme`, `CometChatTypography`, and `CometChatSpacing` in `CallLogUserCell` and `CallLogDetailsHeaderView`.
* **Filters:** Use `CallLogViewModel` to filter by call type (incoming, outgoing, missed).
* **Empty States:** Implement an `EmptyStateView` in `CallLogHistoryVC` for no-history scenarios.

## Filtering & Edge Cases

* **No Call Logs:** Show a custom empty state instead of a blank table.
* **Pagination:** Add lazy loading in `scrollViewDidScroll` of `CallLogHistoryVC` to fetch more entries.
* **Blocked Users:** In `CallLogParticipantsVC`, disable profile navigation if the user is blocked.

## Error Handling

* **Network/API Errors:** Display `UIAlertController` on fetch failures; expose error via `CallLogViewModel` delegate.
* **Retry Mechanism:** Add pull-to-refresh or a retry button in `CallLogDetailsVC`.
* **Recording Unavailable:** Gracefully disable playback links if URL is missing.

## Optional Notes

* **Group Calls vs 1:1 Calls:** Customize `CallLogParticipantsVC` display based on call type and participant roles.
* **Metadata Display:** Use `CallLogDetailsHeaderView` to show titles, call duration, and status icons.

## Feature Matrix

| Feature                      | Component / Method         | File(s)                                               |
| :--------------------------- | :------------------------- | :---------------------------------------------------- |
| Show call log details screen | `CallLogDetailsVC(call:)`  | `CallLogDetailsVC.swift`                              |
| Display participants         | `CallLogParticipantsVC`    | `CallLogParticipantsVC.swift`                         |
| Display history entries      | `CallLogHistoryVC`         | `CallHistoyTVC.swift`, `CallLogHistoryVC.swift`       |
| List recordings              | `CallLogRecordingsVC`      | `CallLogRecordingsVC.swift`, `CallRecordingTVC.swift` |
| Header metadata              | `CallLogDetailsHeaderView` | `CallLogDetailsHeaderView.swift`                      |
| Data handling                | `CallLogDetailsModel`      | `CallLogDetailsModel.swift`                           |
| Data fetching & distribution | `CallLogViewModel`         | `CallLogViewModel.swift`                              |

<CardGroup>
  <Card title="Full Sample App">
    Explore a full sample implementation:
    [GitHub → SampleApp](https://github.com/cometchat/cometchat-uikit-ios/tree/v5/SampleApp)
  </Card>

  <Card title="UIKit Source Code">
    Review the call log components in the UIKit library:
    [GitHub → Call Log Components](https://github.com/cometchat/cometchat-uikit-ios/tree/v5/SampleApp/View%20Controllers/CometChat%20Components/Call%20Log%20Details)
  </Card>
</CardGroup>
