Starter Deal! First 3 month from only $9.9 /month!
Starter Deal! First 3 month from only $9.9 /month!
Grab It Now 
Tencent RTC Blog
Tencent RTC Blog
Tutorial

How to Add Call Status Observer in Your iOS App

Tencent RTC - Dev Team

How to Add Call Status Observer in Your iOS App.png

In your audio and video calling application on the iOS platform, you may need to use callback functions to obtain the user's call status and make timely responses. For example, when you know that the current call is a group call, you may need to allocate more resources to reduce latency and ensure a better calling experience for users. Tencent RTC Call (TUICallKit) provides developers with a rich set of callback functions to meet various business requirements.

For more information, please refer to our technical documentation, which includes the API documentation for TUICallObserver. It provides detailed information about the parameters and more. Feel free to explore it.

Now, let's take the callbacks "onCallReceived", "onCallBegin", and "onCallEnd" as examples to guide you on how to invoke callback functions in your iOS project.

Video Tutorial

How to Use TUICallObserver in Your iOS Calling App?

Note: If you haven't set up your own iOS audio and video calling application yet, please refer to this tutorial blog: "How to Build A Video Calling App on iOS" and follow the steps to enter the TRTC console for creating your Call application.

Step 1: Import the TUICallEngine component and add the TUICallObserver protocol.

To begin, navigate to your iOS project and import the TUICallEngine component. Then, add the TUICallObserver protocol at the appropriate location, as shown in the following image:

import the TUICallEngine component & add the TUICallObserver protocol.png

Next, register the callback events in the TUILogin function. Here, you will need to use TUICallEngine and add the callbacks:

Set Up
Call
Build App
iOS development