logo
Live Streaming
On this page

Running Sample Source Code Guide

2026-03-05

This article introduces how to quickly run the sample source code and experience basic audio and video call services.

Prepare Environment

Before running the sample source code, please ensure the development environment meets the following requirements:

  • Xcode 15.0 or above.
  • iOS 12.0 or above iOS device or simulator that supports audio and video (real device is recommended).
  • The iOS device is connected to the Internet.

Prerequisites

You have created a project in the ZEGOCLOUD Console and applied for a valid AppID and AppSign.

Warning

The SDK also supports Token authentication. If you need to upgrade the authentication method, please refer to How to Upgrade from AppSign Authentication to Token Authentication.

Get Sample Source Code

Sample Source Code Directory Structure

The following directory structure is the file structure of the ios_objc subdirectory. All file paths involved below are relative to this directory.

.
├─ DownloadSDK.sh
├─ Libs # ZegoExpressVideo iOS SDK storage directory
├─ README.md
├─ README_zh.md
├─ VERSION.txt
├─ ZegoExpressExample
|    ...
│    ├─ Examples
│    │    ├─ AdvancedAudioProcessing   # Advanced audio features
│    │    ├─ AdvancedStreaming         # Advanced publishing and playing stream features
│    │    ├─ AdvancedVideoProcessing   # Advanced video features
│    │    ├─ CommonFeatures            # Common features
│    │    ├─ Debug&Config              # Testing and configuration
│    │    ├─ Others                    # Other features
│    │    ├─ QuickStart                # Quick start
│    │    └─ Scenes                    # Best practices
|    ...
│    ├─ Info.plist
│    ├─ KeyCenter.h
│    ├─ KeyCenter.m # Fill in the applied AppID and AppSign
│    ...
└─ ZegoExpressExample.xcodeproj  # demo project file

Run Sample Source Code

  1. Open "AppStore", search for "Xcode" and download and install.

  2. Use Xcode to open the "ZegoExpressExample.xcodeproj" file.

    1. Open Xcode, select the menu "File > Open..." in the upper left corner.
    1. In the unzipped sample source code folder, find and open the "ZegoExpressExample.xcodeproj" file.
  3. Log in to Apple developer account.

    1. Open Xcode, select the menu "Xcode > Preferences..." in the upper left corner.
    1. Click the "Accounts" tab, click the "+" in the lower left corner, select to add "Apple ID", click "Continue".
    1. Enter Apple ID and Password to log in.
  4. Modify Bundle Identifier and developer certificate.

    1. Open Xcode, click the "ZegoExpressExample" project on the left.
    1. Open the TARGETS option, developers can click the "General" tab as needed to modify the project's Bundle Identifier.

    Click the "Signing & Capabilities" tab and select your own developer certificate.

  5. Modify the "/ZegoExpressExample/KeyCenter.m" file and fill in the "AppID" and "AppSign" required for SDK initialization.

    Warning

    Please use the AppID and AppSign obtained in Prerequisites of this article to fill in correctly, otherwise the sample source code cannot run normally.

  6. Connect the iOS device to the development computer, click "Any iOS Device" at the top of Xcode.

    In the pop-up option box, select this iOS device (or simulator).

  7. Click the "Build" button in the upper left corner of Xcode to compile and run the sample source code.

Experience Audio and Video Call/Live Streaming Features

Run the project on a real device. After successful running, you can see the local video image.

To facilitate experience, ZEGO provides a Web platform for debugging. On this page, enter the same AppID and RoomID, enter different UserIDs, and the corresponding Token, you can join the same room and communicate with the real device. When the audio and video call starts successfully, you can hear the remote audio and see the remote video image.

Previous

CDN Live Streaming Pricing

Next

Integrating SDK

On this page

Back to top