This sample source code contains the sample source code of GoClass Client and GoClass Server. This article describes how to run the sample source code. It is recommended that the client and server be used together. The guidelines are divided into two parts:
The sample code is for reference only when the developer accesses it. ZEGO is not responsible for the follow-up maintenance of the sample source code.
If the developer plans to use the sample source code in a production environment, please make sure to perform sufficient testing before release to avoid potential problems and losses.
Please ensure that the development environment meets the following technical requirements:
Please go to ZEGO Management Console to register an account and apply for the AppID and AppSign required to initialize the SDK. For the application process, please refer to Project Management.
AppStore, search for Xcode, download and install it.
go_class.xcworkspace.a. Open Xcode and select File> Open... in the upper left corner.

b. Select src/go_class_ios/go_class.xcworkspace in the unzipped sample source code folder, and click Open.

a. Open Xcode and select Xcode > Preference in the upper left corner.
b. Click the Account tab, click the + sign in the lower left corner, select to add an Apple ID, and click Continue.

c. Enter Apple ID and password to log in.

a. Open Xcode and click the go_class project on the left.

b. Click the Signing & Capabilities tab and select your own developer certificate in Team.


At the same time, you need to configure the host address of the locally deployed GOClass server in the corresponding field.

Then you can set the default environment by calling the setNormalEnv method of the ZegoClassEnvManager singleton in the demo, or you can modify it to the developer's target environment in this method.

Generic iOS Device in the upper left corner of Xcode to select the real iOS device.


go env -w GO111MODULE=on to turn on the golang module.go env -w GOPROXY=https://goproxy.cn to set up golang proxy.Please go to ZEGO Management Console to register an account and apply for AppID and ServerSecret. Refer to Project Management.
git clone https://github.com/zegoim/go-class.git
The GoClass sample source code contains the GoClass client source code and server source code. If the developer has downloaded the sample source code package when running the GoClass client source code, there is no need to download it again here.
src/go_class_server/go_class_room/conf/.cd src/go_class_server/go_class_room/conf/
app.conf file.RedisAddr = "192.168.100.62:6379" # redis host
RedisPassword = "" # redis password
RedisIndex = 8 # redis database
[SmallClass] # Small class class appid related configuration If you don’t need small class scene, you don’t need to care about related configuration
AppId = 123456789
AppSecret = "eb2280544902dc1b7ab1fde3985bd083" # ServerSecret obtained from zego console
...
MaxPeopleNum = 10 # The maximum number of people online at the same time in the classroom
MaxJoinLiveNum = 4 # The maximum number of simultaneous microphones in the small class classroom
[LargeClass] # Large class class appid related configuration If you don’t need large class scenario, you don’t need to care about related configuration
AppId = 987654321
AppSecret = "13nce767a02dc1b7bd083ab1fde3985" # ServerSecret obtained from zego console
...
MaxPeopleNum = 50 # Maximum number of simultaneous online people in large classes
MaxJoinLiveNum = 1 # The maximum number of simultaneous microphones in the large class classroom
go_class_room directory and start the service.cd ../go_class_room
go run main.go
