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


Development environment:

  • Xcode 10.0+.
  • Physical iOS device 8.0+ (iPhone or iPad).
  • 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 :ios, '9.0'
    target 'Your App' do
      pod 'AgoraRtcEngine_iOS'
  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 Video SDK for iOS and unzip the downloaded SDK package.

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

  3. Navigate to the Build Phases tab. Expand the Link Binary with Libraries section to add the following libraries. To begin adding the new libraries, click the + button.

    • AgoraRtcEngineKit.framework
    • Accelerate.framework
    • SystemConfiguration.framework
    • libc++.tbd
    • libresolv.tbd
    • CoreMedia.framework
    • VideoToolbox.framework
    • AudioToolbox.framework
    • CoreTelephony.framework
    • AVFoundation.framework
    • CoreML.framework

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


Set the dependency of CoreML.framework as Optional in Xcode if your device runs iOS 9 or before.

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.


Additional Settings and Permissions

The Agora SDK provides the following additional settings and permissions for you to optimize your project:

  • Set the Background Modes. When the background mode is enabled, your application can still run the video call when it is switched to the background. Select the current Target, click the Capabilities tab, enable Background Modes, and check Audio, AirPlay, and Picture in Picture.

  • Enable or disable Bitcode. Applications developed with Bitcode can be optimized once it is uploaded to the App Store. Select the current Target, click the Build Settings tab, and enable or disable Bitcode according to your needs.


Next Steps

You have set up the iOS 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