Guidelines for Running Sample Codes
1 Prepare the Environment
Please ensure that the development environment meets the following technical requirements:
- Xcode 7.0 or above.
- iOS device or simulator with iOS 9.0 or above and supports audio and video (real device is recommended).
- The iOS device is connected to the Internet.
3 Run the Sample Codes
Open AppStore, search for "Xcode", download and install it.
Use Xcode to open "ZegoExpressExample-iOS-OC.xcodeproj".
Open Xcode and select "File > Open..." in the upper left corner.
Select "ZegoExpressExample-iOS-OC.xcodeproj" in the unzipped sample code folder, and click "Open".
Log in to your Apple ID account.
Open Xcode and select "Xcode > Preferences..." in the upper left corner.
Click the "Account" tab, click the "+" in the lower left corner to sign, select to add an Apple ID, and click "Continue".
Enter Apple ID and Password to log in.
Modify the developer certificate and Bundle Identifier.
Open Xcode and click the "ZegoExpressExample-iOS-OC" project on the left.
Click the "Signing & Capabilities" tab and select your own developer certificate in the "Team".
The downloaded sample code lacks the AppID and AppSign required for SDK initialization. You need to modify the "ZGKeyCenter.m" file in the "ZegoExpressExample-iOS-OC/Helper" directory. Please use the AppID and AppID obtained in the 2 Prerequisites of this article. Fill in AppSign correctly, otherwise the sample code will not run normally.
Connect the iOS device to the development computer, click "Generic iOS Device" in the upper left corner of Xcode to select the iOS device (or simulator).
Click the Build button in the upper left corner of Xcode to compile and run the sample code.
4 Experience Real-time Audio and Video Functions
Run the project on the real machine. After running successfully, you can hear the local audio and see the local video screen.
Through Web-side debugging example (only supported in the test environment), enter the same App ID and roomID, and add the same room and real machine Equipment intercommunication. When you successfully start an audio and video call, you can hear the local and remote audio at the same time, and see the local and remote video screens.
In pure audio scenarios, only audio can be heard, but no video screens can be seen.
Compile the sample code time report 'The app ID "im.zego.ZegoExpressExample-iOS-Objective-C" cannot be registered to your development team. Change your bundle identifier to a unique string to try again.' What should I do?
Refer to the steps of "Modify Developer Certificate and Bundle Identifier" in the above Guidelines for Running Sample Codes, switch to your own development certificate in "Targets > Signing & Capabilities" and modify "Bundle Identifier" before running.