Live Broadcast Quickstart - Mac¶
Step 1: Obtain the SDK¶
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. Refer to Obtaining an App ID
Be sure that the following libraries are ready.
Step 3: Demonstrate the Live Broadcast¶
Agora provides a sample code called Open Live. Follow this section to compile and run it.
Compile the Sample Code¶
- Open OpenLive.xcodeproj using Xcode.
- Fill your own App ID in KeyCenter.swift.
- Click the build and run button to compile the demo.
Execute the Sample Code¶
You can demonstrate the OpenLive sample code after the compilation. The demonstration requires at least two Mac devices：
- Open Open Live on the Mac device.
- Set the Host Mode.
- Set the Audience Mode.
- Enter the channel name set by the host.
- Click Join as Audience on the keyboard.