Communication Quickstart - Mac¶
Step 1: Download the Sample Code¶
Download the latest SDK from downloads and follow this document to compile and execute the sample code.
Agora Native SDK for Mac package structure is listed as follows:
- ./libs: including the required libraries
- ./samples: including the sample codes
- Communication: Agora-macOS-Tutorial-Swift-1to1
- Live Broadcast: Open Live
Step 2: Prepare the Environments¶
Be sure that the following development environment requirements are satisfied.
- Apple XCode version 6.0 or later
- OS X 10.0 or later
- Prepare an App ID according to Obtaining an App ID
Step 3: Demonstrate the Video Call¶
Demonstrate the video call with Agora-macOS-Tutorial-Swift-1to1 sample code in the Mac package.
Compiling the Sample Code¶
- Open Agora Mac Tutorial.xcodeproj using Xcode.
- Open the project file and the Navigation panel on the left displays the file structure of Open Video Call shown as follows:
- Enter your App ID in the AppID.swift .
- Select the project and then click on Build and Run button to start compiling.
Executing the Sample Code¶
You need two Mac devices to run the sample code for a video call. Click the generated App on each Mac device, and the following screen displays:
You can press the buttons on the screen to switch to audio communication, mute, switch camera, share screen and etc.