The sample code package is only for demonstrating the features of collaborative whiteboard and file sharing products. It can be used as a reference to assist with your development. However, the codes provided in this package haven't been rigorously tested. If you plan to use them in a production environment, make sure you conduct sufficient testing before release to avoid any potential issues that may cause losses.
Run the sample code
1 Set up the development environment
Make sure your development environment meets the following requirements:
- Xcode 7.0 or later.
- An iOS device or simulator that is running iOS 9.0 or later (iPad devices or simulators cannot run all functions correctly).
- The iOS device is connected to the internet.
Before you begin, make sure you complete the following steps:
- Create a project in the ZEGO Admin Console and get the AppID and AppSign of your project. For details, see ZEGO Admin Console - Project management.
3 Run the sample code
If you haven't done so already, install Xcode from the AppStore.
Launch Xcode, and open the file
a. In Xcode, select the menu File > Open.
b. Select the file
ZegoWhiteboardExample.xcworkspacein the unzipped sample code folder, and click Open.
Add your Apple developer account.
a. Select the menu Xcode > Preferences.
b. Click Accounts.
c. In the lower-left corner, click the Add button (+).
d. In the sheet that appears, choose Apple ID, then click Continue.
e. In the next sheet, enter your Apple ID, click Next, enter your password, then click Next.
Change the bundle ID and signing certificate.
a. In Xcode, select the ZegoWhiteboardExample project in the project navigator.
b. Click Signing & Capabilities. Under Signing, choose your team from the Team pop-up menu, and change Bundle Identifier to your own setting.
ZegoLocalEnvManager.mfile to specify your AppID and AppSign, which are required for initializing the SDK.
Connect the iOS device to your development computer.
In Xcode, click Any iOS Device, and select the iOS device you just connected.
Switch to the folder where the file
Podfileis located, run the command
pod installin the Terminal, and then wait for the command to complete.
Click the Build button to compile and run the sample code.