This document introduces how to get the source code of Agora Flexible Classroom (iOS) from GitHub and run the project, so as to quickly launch a flexible classroom and experience the features.
The following figure shows the workflow to join a flexible classroom.
When an app client requests to join a flexible classroom, the app client and your app server interact with the Agora server in the following steps:
Running Flexible Classroom on your device depends on Xcode and CocoaPods.
To prepare your development environment, refer to the following steps:
The source code of Flexible Classroom (iOS) is in the CloudClass-iOS and apaas-extapp-ios repositories. To download the source code to your local device, refer to the following steps:
To clone the CloudClass-iOS repository to your local computer, run the following command:
git clone https://github.com/AgoraIO-Community/CloudClass-iOS.git
To navigate into the CloudClass-iOS directory and switch to a specified version, run the following commands. Replace {VERSION} with the version number that you want:
cd CloudClass-iOS
git checkout release/{VERSION}
For example, if you want to switch to the branch of v2.6.2, just run the following command:
git checkout release/2.6.2
Agora recommends switching the branch of the latest release. The following image shows how to see the latest release branch in the GitHub repository:
To clone the apaas-extapp-ios repository to your local device, run the following command:
git clone https://github.com/AgoraIO-Community/apaas-extapp-ios.git
Place the apaas-extapp-ios project under the same directory with CloudClass-iOS, just as shown in the following image:
To navigate into the apaas-extapp-ios directory and switch to a specified version, run the following commands. Replace {VERSION} with the version number that you want:
cd apaas-extapp-ios
git checkout release/{VERSION}
Follow these steps to launch a flexible classroom:
Navigate into the CloudClass-iOS/App directory:
cd CloudClass-iOS/App
Install dependencies.
pod install
The following image shows the process of installing dependencies.
After all the dependencies are installed successfully, open the CloudClass-iOS folder in the Finder window, and double-click AgoraEducation.xcworkspace
to open the project in Xcode.
In Signing & Capabilities under the project TARGETS, check Automatically manage signing, and configure your Apple developer account and Bundle Identifier.
After connecting an iOS device to your computer, to run the project, click the Run button in Xcode.
You can see the following page: To join a classroom, pass in a room name and user name, select a room type, and click Enter.
Satisfied with the features of Flexible Classroom and want to explore more? Next, you can integrate Flexible Classroom into your own project.