Swift

Overview

In this tutorial you will use media link statistics from the Client Observability API to monitor network health on iOS—estimated downlink bandwidth, the remote publisher’s uplink estimate (when available), and which side of the connection the SDK blames when quality degrades (networkDegradationSource). The sample shows those values in an on-screen overlay so you can see them change during a live session.

Example use case: A user’s remote video stutters. Your app is already subscribed. Media link stats help you decide whether to show “Your connection looks weak” (local downlink), “The other participant’s network may be unstable” (remote uplink / degradation source), or to log both numbers for support—without parsing raw WebRTC reports.

For the complete API on iOS, see Client Observability (iOS Swift).

Estimated completion time: 25 mins

Want to skip this tutorial? You can jump straight to the completed Swift client code in the BasicVideoChat and observability patterns in our iOS sample app repo on GitHub. This tutorial walks through a focused SwiftUI implementation similar to the Android Client Observability tutorial.

Note: The code in this tutorial is written in Swift. For Objective-C, see Client Observability (Objective-C).

Requirements

To complete this tutorial, you’ll need: