Live Broadcast Integration - iOS

Step 1: Prepare the Environment

Be sure that the following development environment requirements are satisfied:

  • Apple XCode version 6.0 or higher
  • iOS 7.0 or later
  • Real iOS devices with audio and video functionality
  • Agora Native SDK for iOS: Download either of the latest Voice Package and Full Package(Voice and Video) from downloads .

Step 2: Add the Agora SDK

  1. Copy the folder libs from the Agora Native SDK you have downloaded in Step 1: Prepare the Environment to the project folder.


    Add the required libraries according to either of the following Step 2 or Step 3.

  2. Use CocoaPods to add the libraries automatically.

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

      brew install cocoapods

      For details on how to use the CocoaPods, refer to Cocoapods .

    2. Add the Agora SDK references in the Podfile:

      • For Voice Package:

        pod 'AgoraAudio_iOS'
      • For Full Package:

        pod 'AgoraRtcEngine_iOS'
  3. Add the libraries manually.

    1. Select the current Target.

    2. Set the search path of framework in Xcode.

    3. Select File> New> Group in Xcode, and name it, for example, as Frameworks to include all the required frameworks from Agora later.

    1. Click the Frameworks folder you’ve just created, and then go to Building Phases.

    2. Expand the Link Binary with Libraries, and click + to add the following libraries.



      AgoraRtcEngineKit.framework is located in the libs folder which you have copied to your project folder on the desktop. After you click +, then click Add Other… on the dialog box and go to your project folder to add it.


Step 3: Access Library


In the file viewController.h, add #import <AgoraRtcEngineKit/AgoraRtcEngineKit.h> to enable the use of Agora Native SDK for iOS.


By default, Agora Native SDK uses libc++ (LLVM). Contact if you prefer to use libstdc++ (GNU).

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


  1. Create a new bridging file called agora-Bridging-Header.h .

  2. Added the following contents in the bridging file to reference the Agora SDK.

    #import <AgoraRtcEngineKit/AgoraRtcEngineKit.h>
    #import <AgoraRtcCryptoLoader/AgoraRtcCryptoLoader.h>
  3. Set the file as Objective-C Bridging Header:

    1. Select the current Target.
    2. Select Building Settings > Swift Compiler-General, and set Objective-C Bridging Header as <targetname>/agora-Bridging-Header.h .

Step 4: Authorize to Use Agora SDK

You need to grant the following items the rights to use Agora SDK:

  • Camera
  • Microphone

Grant the mentioned rights in info.plist:

  • Set Privacy - Camera Usage Description as use camera to start video call

  • Set Privacy - Microphone Usage Description as use microphone to start video call


Step 5: Other Settings

  1. Set the Background Modes by selecting Audio, AirPlay, and Picture in Picture .



    Do NOT select Voice over IP if signaling call is not enabled.

  2. Disable bitcode due to Agora SDK does not support it by selecting the current target and set according to the following:


Step 6: Call APIs

Refer to Live Broadcast API - iOS to implement the required functions.