Code sample
This topic provides a code sample for integrating audio and video calling into an iOS client and explains how to use it.
Download the code sample
Click here to download the audio and video calling code sample.
Use the code sample
Add the configuration file to the sample project.
Download the
.configconfiguration file for the mPaaS application and add it to the audio and video calling sample project.Run the
pod mpaas update 10.1.68 && pod installcommand.
In the navigation pane on the left of the console, choose Audio & Video Calling > Calling Application Management. Create a calling application or open an existing one to obtain its bizName.
Generate a temporary signature. In the navigation pane on the left of the console, choose Audio & Video Calling > Signature Verification. In the Generate Temporary Signature area, select the calling application and enter a User ID to generate a temporary signature.
NoteIf you change the calling application or User ID, you must generate a new temporary signature.
Temporary signatures expire. You must generate a new one after the current signature expires.
Configure the sample project. Run the sample project. On the App Settings page, enter the user ID (userId), business name (bizName), and temporary signature (signature) that you obtained in the previous steps.
NoteTo ensure your traffic is secure, generate signatures on the server-side using secure signing after the application is published.
Start or join an audio or video call. To start a call, create a call channel in the app. Alternatively, to join a call, enter the channel ID (roomId) and Token of a channel created by another user.
NoteWithin the same calling application (using the same bizName), the user ID for each client must be unique.