Skip to main content

You are looking at Signaling v1.x Docs. The newest version is  Signaling 2.x

Version: 1.x

Run the sample project

This page shows you how to install and run the Signaling example project.

Prerequisites

In order to follow this procedure you must have:

  • Xcode 12.0 or higher.
  • A device running macOs 10.11 or higher.
  • An Apple developer account
  • An Agora account and project.

  • A computer with Internet access.

    Ensure that no firewall is blocking your network communication.

Implement Signaling

1. Create an Agora project

Create a project in Agora Console, as follows:

  1. Log in to Console, and click Project Management in the left navigation menu to enter the Project Management page.

  2. Click Create.

    create button

  3. Enter your project name, and select APP ID for the authentication mechanism in the pop-up window. Agora recommends using an App ID for authentication only in a test environment, or if your project has low security requirements.

  4. Click Submit. You can see the created project on the Project Management page.

2. Get an App ID

Agora automatically assigns each project an App ID as a unique identifier.

To copy this App ID, find your project on the Project Management page in Agora Console, and click the eye icon to the right of the App ID.

get app id

3. Integrate the Signaling SDK

Refer to the following steps to integrate the Signaling SDK into the sample project:

  1. Download the Signaling repository on Github, and locate the Agora-Signaling-Tutorial-macOS-Swift folder.

    Agora-Signaling-Tutorial-macOS-Swift is implemented in Swift.

  2. Download the latest version of Real time Messaging SDK (macOS) and extract the files.

  3. Integrate per your SDK version:

    • (1.4.3 or earlier) Copy the .framework file in libs to Agora-Signaling-Tutorial-macOS-Swift\Agora-Signaling-Tutorial.

    • (1.4.4 or later)

      1. Copy the .framework file in libs to Agora-Signaling-Tutorial-macOS-Swift\Agora-Signaling-Tutorial.

      2. Open Xcode, navigate to TARGETS > Project Name > General > Frameworks, Libraries, and Embedded Content and click - to remove the following libraries:

        • libc++.tbd

        • libresolv.tbd

        • SystemConfiguration.framework

        • CoreWLAN.framework

      3. Change the Embed property of AgoraRtmKit.framework to Embed & Sign.

4. Run the sample project

Refer to the following steps to run the sample project:

  1. (Agora-Signaling-Tutorial-macOS-Swift) Enter your App ID in AppId.swift.

  2. Compile and run the sample project.

  3. Enter any string as the user ID (such as userA) and click Login to log in to Signaling.

    You need to specify the user ID yourself. The user ID supports the following character set:

    • All lowercase English letters: a to z

    • All uppercase English letters: A to Z

    • All numeric characters: 0 to 9

    • The space character.

    • Punctuation characters and other symbols, including: "!", "#", "$", "%", "&", "(", ")", "+", "-", ":", ";", "<", "=", ".", ">", "?", "@", "[", "]", "^", "_", " , ", "|", "~", ","

1623307352854

Expected result

1623307357982

Signaling