AI Effects
  • iOS : Objective-C
  • Android
  • Overview
  • Release notes
  • SDK downloads
  • Demo app
  • Sample codes
  • Getting started
    • Integrate the SDK
    • Import resources and models
    • Online authentication
    • Implement basic image processing
  • Guides
    • Face beautification
    • Face shape retouch
    • Beauty makeups
    • Background segmentation
    • Face detection
    • Stickers
    • Filters
  • Tutorials
  • Error codes
  • Documentation
  • AI Effects
  • Sample codes

Run the sample code

Last updated:2022-04-19 16:17

Prerequisites

Before you begin, make sure you complete the following steps:

  • Contact the ZEGO team to get the latest version of the SDK and sample code.
  • Contact the ZEGO team to get the AppID and AppSign for online privilege authentication.
  • Get the unique license file of the Effects SDK. For details, see Online privilege authentication.

Make sure your development environment meets the following requirements:

  • Xcode 7.0 or later.
  • An iOS device or simulator that is running on iOS 13.0 or later and supports audio and video. We recommend you use a real device.

Run the sample code

  1. Install Xcode from the AppStore.

  2. Launch Xcode, and open the project file ZegoEffectsExample.xcodeproj.

    1. In Xcode, select the menu File > Open.

    2. Select the ZegoEffectsExample.xcodeproj file in the unzipped sample code folder, and click Open.

  3. Add your Apple developer account.

    1. Select the menu Xcode > Preferences.

    2. Click Accounts .

    3. In the lower-left corner, click the Add button (+).

    4. In the sheet that appears, choose Apple ID, then click Continue.

    5. In the next sheet, enter your Apple ID, click Next, enter your password, then click Next.

  4. Change the bundle ID and signing certificate.

    1. In Xcode, select the ZegoEffectsExample project in the project navigator.

    2. Click Signing & Capabilities. Under Signing, choose your team from the Team pop-up menu, and change Bundle Identifier to your own setting.

  5. Specify the license information (AppID and AppSign), which are required for initializing the SDK.

    a. Obtain the AppID and AppSign according to the 2 Prerequisites.

    b. To run the Objective-C target ZegoEffectsExampleLegacy, modify the ZegoLicense.m file in the ZegoEffectsExampleLegacy directory.

  6. Connect the iOS device to your development computer.

  7. In Xcode, click Generic iOS Device in the upper-left corner, and select the iOS device you just connected. Or, you can choose to use a simulator.

  8. Click the Run button to build and run the sample code.

Page Directory