This page contains information on how to prepare the development environment before enabling a call/live broadcast with the Agora SDK for macOS.


Development environment:

  • Xcode 10.0+.
  • Physical OS X 10.0+.
  • Ensure that your project has a validated provisioning profile certificate.
  • Before accessing Agora’s services, ensure that you open the ports and whitelist the domains specified in Firewall Requirements.

Use a physical device to run the sample. Emulators may lack the functionality or the performance needed to run the sample.

Add the Agora SDK to Your Project

Choose one of the following methods to add the Agora SDK libraries to your project:

Add the Libraries Automatically

  1. Install CocoaPods by running the following command in Terminal:

    brew install cocoapods
    • Skip this step if you have preconfigured CocoaPods and Homebrew on your system.
    • If you see -bash: brew: command not found in Terminal, install Homebrew before running the command. See Homebrew Installation Method.
  2. Create a Podfile in your project. In the root directory of your project, run the following command in Terminal. This creates a Podfile in the same directory.

    pod init
  3. Add the Agora SDK reference in the Podfile. Open the Podfile, and put in the following content. Fill “Your App” with the name of your Target.

    platform :macOS, '10.11'
    target 'Your App' do
      pod 'AgoraRtcEngine_macOS'
  4. Update the local Cocoapods library. Run the following command in Terminal:

    pod update
  5. Install the related libraries.

    pod install

    If you see Pod installation complete! in Terminal, you have successfully added the libraries. Click to open the YourApp.xcworkspace file, or run the following command to open it. Fill “YourApp” with the name of your Target.

    open YourApp.xcworkspace

Add the Libraries Manually

  1. Download the Agora SDK for macOS and unzip the downloaded SDK package.

  2. Open your project with Xcode and select the current Target.

  3. Navigate to the Build Phases tab.

  4. Expand the Link Binary with Libraries section to add the following libraries. To begin adding the new libraries, click the + button.

    • AgoraRtcEngineKit.framework
    • libresolv.tbd
    • libc++.1.dylib
    • Accelerate.framework
    • SystemConfiguration.framework
    • CoreWLAN.framework
    • Foundation.framework
    • CoreAudio.framework
    • CoreMedia.framework
    • AVFoudation.framework
    • VideoToolbox.framework
    • AudioToolbox.framework
    • CFNetwork.framework
    • CoreGraphics.framework
    • CoreVideo.framework




AgoraRtcEngineKit.framework is in the libs folder of the downloaded SDK. Click + > Add Other…, go to the downloaded SDK, and add AgoraRtcEngineKit.framework.


Authorize the Use of the Agora SDK

Before enabling a video call, you need to enable camera and microphone access to the SDK on your device. Open info.plist and click + to add:

  • Privacy - Microphone Usage Description, and add a note in the Value column.
  • Privacy - Camera Usage Description, and add a note in the Value column.





Access the Library

You can access the added library using Objective-C or Swift.


In the main file that uses the Agora APIs, add #import <AgoraRtcEngineKit/AgoraRtcEngineKit.h>.

The SDK provides FAT image libraries with multi-architecture support for both 32/64-bit audio emulators and 32/64-bit audio/video real devices.


In the main file that uses the Agora APIs, add import AgoraRtcEngineKit.


Next Steps

You have set up the macOS environment and can start a call/live broadcast following the steps under Quickstart Guide:

  • Initialize the SDK
  • Join a Channel
  • Publish and Subscribe to Streams