Run the sample code
Prerequisites
Before you begin, make sure you complete the following steps:
- Get the latest version of the SDK and sample code in SDK downloads.
- Contact the ZEGOCLOUD 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
-
Install Xcode from the AppStore.
-
Launch Xcode, and open the project file
ZegoEffectsExample.xcodeproj
.1Select the menu File > Open.2Open the sample codeSelect the
ZegoEffectsExample.xcodeproj
file in the unzipped sample code folder, and click Open. -
Add your Apple developer account.
-
Select the menu Xcode > Preferences.
-
Click Accounts .
-
In the lower-left corner, click the Add button (+).
-
In the sheet that appears, choose Apple ID, then click Continue.
- In the next sheet, enter your Apple ID, click Next, enter your password, then click Next.
-
-
Change the bundle ID and signing certificate.
- In Xcode, select the ZegoEffectsExample project in the project navigator.
- Click Signing & Capabilities. Under Signing, choose your team from the Team pop-up menu, and change Bundle Identifier to your own setting.
-
Add SDK dependencies and resources.
- Copy or replace the "ZegoEffects.xcframework" folder from the SDK directory after download to the "Example > Libs" path.
- Copy or replace the "Models" and "Resources" folders from the root directory to the "Example > Resources" path.
-
Connect the iOS device to your development computer.
-
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.
-
Click the Run button to build and run the sample code.