This article describes how to quickly run the sample source code and experience basic audio and video calling services.
Before you run the sample source code, make sure that the development environment meets the following requirements:
Go to ZEGOCLOUD Admin Console to create a new project, and get the AppID and AppSign of your project.
The SDK now also supports using Token for authentication, if you want to change your authentication mode, refer to the Guide for upgrading the authentication mode from using the AppSign to Token.
The following directory structure is the file structure of the ios_objc
subdirectory, and the file paths mentioned below are all 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 stream publish and play
│ │ ├─ AdvancedVideoProcessing # Advanced video features
│ │ ├─ CommonFeatures # Common functions
│ │ ├─ Debug&Config # Debug and configure
│ │ ├─ Others # Other functions
│ │ ├─ QuickStart # Quick start
│ │ └─ Scenes # Best practices
| ...
│ ├─ Info.plist
│ ├─ KeyCenter.h
│ ├─ KeyCenter.m # Fill in the AppID and AppSign of the application
│ ...
└─ ZegoExpressExample.xcodeproj # Demo engineering documents
Open AppStore, search for "Xcode", and download and install it.
Open the ZegoExpressExample.xcodeproj
file by using Xcode.
Open Xcode and select File > Open... in the upper-left corner.
In the decompressed sample source code folder, select the ZegoExpressExample.xcodeproj
file and open it.
Log in to your Apple developer account.
Open Xcode and select Xcode > Preferences... in the upper-left corner.
Click the Accounts tab, click the plus (+) icon in the lower-left corner, select Add Apple ID, and click Continue.
Enter your Apple ID and password to log in.
Modify the Bundle identifier and developer certificate.
Open Xcode and click the "ZegoExpressExample" project on the left.
Open the TARGETS option. Developers can click the General tab to modify the Bundle identifier of the project based on their needs and click the Signing & Capabilities tab to select the developer certificate.
The AppID and AppSign required for SDK initialization are missing in the sample source code, and the /ZegoExpressExample/KeyCenter.m
file needs to be modified. Please use the AppID and AppSign mentioned in the Prerequisites to fill in the information correctly. Otherwise, the example source code cannot run properly.
Connect the iOS device to the development computer, click Any iOS Device on Xcode, and select the iOS device or simulator in the pop-up window.
Click Build in the upper-left corner of Xcode to compile and run the sample source code.
We recommend you run your project on a real device. If your app runs successfully, you should hear the sound and see the video captured locally from your device.
To test out the real-time audio and video features, visit the ZEGO Express Web Demo, and enter the same AppID
, Server
and RoomID
to join the same room. If it runs successfully, you should be able to view the video from both the local side and the remote side, and hear the sound from both sides as well.
In audio-only scenarios, no video will be captured and displayed.