Collaborative Whiteboard
  • iOS : Objective-C
  • Android
  • Web
  • Electron
  • Windows
  • macOS
  • Overview
  • SDK downloads
  • Demo app
  • Sample codes
  • Development guide
  • Quick starts
  • Use cases
  • Error codes
  • Server APIs
  • Documentation
  • Collaborative Whiteboard
  • Quick starts
  • Integration

Integrate the SDK

Last updated:2022-03-22 13:06

1 Set up the development environment

Make sure your development environment meets the following requirements:

  • Xcode 6.0 or later.
  • An iOS device or simulator running iOS 8.0 or later. We recommend you use a real device.
  • The iOS device is connected to the internet.

2 Prerequisites

  • The ZegoWhiteboardView SDK needs to be used together with the ZEGO Express-Video SDK (with whiteboard support), so you also need to integrate the ZEGO Express-Video SDK (with whiteboard support) into your project. For the detailed integration instructions, see ZEGO Express-Video SDK - Integration.

    • The SDK package provided on the Whiteboard SDK downloads page already includes the ZEGO Express-Video SDK (with whiteboard support), so you don't need to download it separately.

    • If you have already integrated the ZEGO Express-Video SDK into your project before, you need to remove the old SDK and integrate the SDKs that you download from the Whiteboard SDK downloads page to avoid version mismatch between the ZEGO Express-Video SDK and the ZegoWhiteboardView SDK.

  • If you need the file sharing feature, also download the ZegoDocsView SDK.

  • 3 Integrate the SDK

    3.1 Optional: Create a new project

    Skip this step if you already have a project.
    1. Launch Xcode, and in the Welcome to Xcode window, click Create a new Xcode project. Alternatively, choose File > New > Project.

    2. In the sheet that appears, select the iOS platform, then select App under Application, and then click Next.

    3. In the sheet that appears, fill in the text fields and choose options from the pop-up menus to configure your project, then click Next.

      You must enter a Product Name and Organization Identifier to create the bundle identifier that identifies the App in the entire system.

    1. Specify a location to save the project, then click Create.

    3.2 Import the SDK

    Use either one of the following methods to import the SDK into your project.

    Method 1: Integrate the SDK automatically with CocoaPods

    1. If you have not already done so, follow the CocoaPods Installation Guide to install CocoaPods on your computer.

    2. Open the terminal, enter the project root directory, and run the command pod init to create a Podfile.

    3. Open the Podfile and add pod'ZegoWhiteboardView/Express'.

    4. Run the command pod install to install the SDK.

    5. Import the ZegoWhiteboardView SDK header file into the project.

      #import <ZegoWhiteboardView/ZegoWhiteboardView.h>

    Method 2: Manually add the SDK to the project

    1. Download the latest version of the SDK from the Whiteboard SDK downloads page, and extract files from the downloaded SDK package.

      The downloaded two folders iphoneos and iphoneos_simulator. Their differences are as follows:

      1. iphoneos: The Framework file in this folder can be used for building and running your app on real iOS devices only. When you prepare your app for AppStore release, you must use the Framework file in this folder. Otherwise, your app may get rejected by Apple.
      2. iphoneos-simulator: The Framework file in this folder can be used for building and running your app on both real iOS devices and simulators. If you test your app on simulators, you must use the Framework file in this folder. But as mentioned above, when you prepare your app for AppStore release, you must use the Framework file in the iphoneos folder.

      In the following steps, select the Framework file that meets your development requirements.

    1. Manually copy the SDK dynamic library files to the project directory.

    2. Open Xcode and select File > Add Files to "xxx" (xxx is your project name) to add the SDK dynamic library files to the project.

    3. Do the following to add the framework file to the project target:

      a. Select the project target.

      b. Click General, then under Frameworks, Libraries, and Embedded Content, click the Add button (+) below the table.

      c. Add ZegoWhiteboardView.framework to the target, and set Embed to Embed & Sign.

    4. Do the following to set the deployment target.

      a. Select the project target.

      b. Click General, then under Deployment Information, set the deployment target to iOS 8.0 as illustrated below.

    Page Directory