Signaling Quickstart - Mac Beta¶
Step 1: Obtain the Sample Code¶
Agora Signaling SDK for Mac package structure is listed as follows:
- ./libs: including the required libraries
- ./samples: including the sample code called sigosx
The sample code currently only supports audio function. Video function will be provided later.
Step 2: Prepare the Environments¶
Be sure that the following development environment requirements are satisfied:
Platform System Requirement Network Requirement OS X 10.6: “Snow Leopard” or later Port: HTTP 80 ，TCP 8181
If you want to use the Agora Signaling SDK together with Agora Native SDK, be sure that the requirements of Agora Native SDK are also satisfied.
Step 3: Compile the Sample Code¶
Open sigosx.xcodeproj using Xcode.
Fill your own App ID and App Certificate in viewController.m.
You can follow Obtaining an App ID and an App Certificate to get your App ID and APP Certificate.
Click the build and run button to compile the demo.
Step 4: Execute the Sample Code¶
It requires two devices to demonstrate the functions included in the sample code.
After the compilation, the first page displays as follows:
The following table shows the function of the main buttons/menus:
Button Function Login Log onto the signaling system. Switch Switch the calling party and the called party. Call Make a call. Join Join the channel. Message Send the channel messages. xxx The user name of the calling party yyy The user name of the called party demoroom1 the pre-fined channel name
Executing the sample code according to the following scenarios:
- Join Channel
- Make a Call
Scenario 1: Login¶
Click Login on both screens to login onto the signaling system. It returns Login successfully upon a successful login.
Click Logout on both screens to log out of the signaling system if necessary. It returns Logout successfully.
Scenario 2: Join Channel¶
Be sure that both users are logged in.
Click Join on both screens to join the channel demoroom1.
It returns Join channel demoroom1 successfully, the user names and their corresponding UID who joined the channel.
Send a channel message.
On the left, click Message: the user xxx sends a channel message.
Both user xxx and user yyy receive the channel message.
Click Leave on both screens to leave the demoroom1 channel if necessary.
Scenario 3: Make a Call¶
Ensure that both users are logged in.
On the left, click CALL: the user xxx make a call request.
The user xxx automatically joins the channel demoroom1.
The user yyy receives the call invitation.
The user xxx receives the callback that the user yyy has received the invitation.
The user yyy automatically joins the channel demoroom1.
The user xxx receives the callback that user yyy has accepted the invitation.
Both users can now start to talk with each other.
On the left, click Bye to end the call. Both users will leave the channel automatically.
Click Logout on both screens to log out of the system if necessary.