Overview
TheCallLogDetailsVC module provides a tabbed interface for viewing details of past calls:
- History — Chronological join/leave events with timestamps
- Participants — Users who joined the call
- Recordings — Links to cloud-hosted call recordings
Prerequisites
Before implementing call log details, ensure you have:- Completed Getting Started setup
- CometChat UIKit v5+ installed
- CometChatCallsSDK integrated
- User logged in with
CometChatUIKit.login() - Active internet connection
Components
| Component | Description |
|---|---|
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
Step 1: Present Call Log Details Screen
Show the call log interface for a selected call:CallLogDetailsVC.swift
Step 2: Display Participants List
Populate the participants tab with the call’s members:CallLogParticipantsVC.swift
Step 3: Show Call History
Render join/leave activities in chronological order:Step 4: List and Play Recordings
Provide playback links for any recorded calls:Customization Options
Styling
Customize colors, fonts, and spacing using CometChat’s theming system:Filters
UseCallLogViewModel to filter by call type:
Empty States
Implement anEmptyStateView in CallLogHistoryVC for no-history scenarios:
Edge Cases
| Scenario | Handling |
|---|---|
| No call logs | Show a custom empty state instead of a blank table |
| Large history | Add lazy loading in scrollViewDidScroll to fetch more entries |
| Blocked users | Disable profile navigation in CallLogParticipantsVC if the user is blocked |
| Missing recording URL | Gracefully disable playback links |
Error Handling
| Error Type | Solution |
|---|---|
| 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 |
Additional Notes
- Group Calls vs 1:1 Calls — Customize
CallLogParticipantsVCdisplay based on call type and participant roles - Metadata Display — Use
CallLogDetailsHeaderViewto 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 |
Related Components
- Call Logs - Display call log list
- Call Features - Overview of calling capabilities
- Ongoing Call - Active call interface