Skip to main content
Build a Calls tab in your iOS app: the user’s call log, and a details screen for any call in it — for support, moderation and post-call review.

Overview

When the user taps a call, the details screen shows:
  • The call: its direction — incoming, outgoing or missed — its date and its duration.
  • Participants: who was in the call, and for how long.
  • Recording: the call’s recordings, to play or download.
  • History: every call with that user, or in that group.
The Kit ships the details screen as CometChatCallLogDetails, in both toolkits.

Prerequisites

  • The Kit installed, initialised with calling on — CometChatSession.initialize(appID:region:enableCalling: true) — and a user logged in. See Calling Integration.
  • NSMicrophoneUsageDescription and NSCameraUsageDescription in Info.plist, for the call buttons on the details screen.

Components

Integration Steps

1. Show the Call Log

Put the list in your NavigationStack, so a row can push the details:
CallsTab.swift

2. Add It as a Tab

Use the CallsTab from step 1 where this shows the bare list:
HomeView.swift
The call log uses your navigation bar for its large “Calls” title in UIKit, and its own NavigationStack in SwiftUI unless you pass embedsNavigationStack: false.

3. What the Details Screen Shows

CometChatCallLogDetails(callLog:) needs nothing else. It shows a header for the call’s user or group with voice and video buttons, a card with the call’s direction, date and duration, and three swipeable tabs:

Implementation Flow

  1. CometChatCallLogs fetches the call log, 30 rows a page, and keeps it fresh: pull-to-refresh, a call ending, a reconnect.
  2. The user taps a row → your handler pushes CometChatCallLogDetails with that ChatCallLog.
  3. The details screen fetches the call’s user or group for its header, and the History tab’s first page.
  4. The header’s buttons, or a call log row’s call-back button, place a new call.

Customization Options

The tabs themselves are not public: you cannot add, remove or reorder them. Replace the header with headerView in SwiftUI, or configure messageHeader in UIKit.

Filtering & Edge Cases

  • Missed calls only: pass CallLogsQuery(direction: .missed) — callLogRequestBuilder in SwiftUI, set(callRequestBuilder:) in UIKit.
  • Calls with recordings: CallLogsQuery(hasRecording: true).
  • No recordings: the Recording tab shows “No Call Recordings” — it is never hidden.
  • Group calls: the call log’s call-back button is hidden on group rows; the details header’s buttons start a group meeting.

Error Handling

onError hears a failed lookup of the user or group, and a failed History page — whose tab then shows “Oops!” and Retry. On the call log, onError and onEmpty cover the list.

Summary / Feature Matrix

Call Logs

Every option of the call log

Call Log Details

Every option of the details screen