Sample code
Download
Here we provide you with a sample application to experience the ZEGOCLOUD's Super Board, and the following describes how to run the sample code.
Prerequisites
-
Xcode 7.0 or later.
-
An iOS device or iOS Simulator that is running on iOS 12.0 or later and supports audio and video. We recommend you use a real device.
-
The iOS device is connected to the internet.
-
Contact the ZEGOCLOUD Technical support to get the AppID and AppSecret for SDK integration.
- By default, the features of this product are not enabled. To use these features, you will need to contact ZEGOCLOUD Technical Support to enable them first.
- For SDK version
2.3.0 or later, you can also use Tokens for authentication. To upgrade the authentication mode, refer to the Upgrade the authentication mode from AppSign to Token.
Run the sample code
- Open AppStore to download the Xcode.

- In Xcode, select the File > Open, open the
ZegoSuperBoardDemo.xcworkspacefile in the extracted sample code package.


- In Xcode, select the Preferences, click the Accounts tab, click the "+" button, then select Apple ID, and click Continue. And then, enter your Apple ID and Password to log in.


- Modify the
Bundle Identifierandcertificate.
a. In Xcode, Select the ZegoSuperBoardDemo project.

b. Select the target project, click the Signing & Capabilities tab, change the Bundle Identifier configuration and select your own developer certificate in the Team.

- Modify the
KeyCenter.mfile with the AppID and AppSecret that you get in the Prerequisites.
// Provide separate App IDs for two regions: Chinese Mainland and Overseas
// If no regional distinction is needed, use the same App ID for both
// Chinese Mainland environment
static unsigned int kAppID = <#YOUR_APP_ID#>;
static NSString* kAppSecret = @"<#YOUR_APP_SECRET#>";
// Other region environment.
static unsigned int kAbroadAppID = <#YOUR_APP_ID#>;
static NSString* kAbroadAppSecret = @"<#YOUR_APP_SECRET#>";- Connect the iOS device to your computer, and select the iOS device in Xcode.


-
Navigate to the folder where the
Podfilefile locates, and run thepod installcommand in the terminal. -
Click the Build button to run the sample code and experience the Super Board service.


