Communication Quickstart - iOS

Step 1: Download the Sample Code

Click downloads to download the latest SDK and follow this document to compile and execute the sample code.

Agora Native SDK for iOS has two packages:

Package Structure
Voice Package

The package structure is listed as follows:

./libs: including the required libraries

./samples: including the sample codes

  • Communication: Agora-iOS-Voice-Tutorial-Swift-1to1
  • Live Broadcast: Not Available
Full Package(including both Voice and Video)

The package structure is listed as follows:

./libs: including the required libraries

./samples: including the sample codes

  • Communication: Agora-iOS-Tutorial-Swift-1to1
  • Live Broadcast: Open Live

Step 2: 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
  • Prepare an App ID according to Obtaining an App ID

Step 3: Demonstrate Voice Call

Demonstrate the voice call with Agora-iOS-Voice-Tutorial-Swift-1to1 sample code in the iOS Voice package.

Compile the Sample Code

  1. Open Agora iOS Voice Tutorial.xcodeproj using Xcode.

    ../../_images/ios-demo-voice-1.png
  2. Enter your App ID in the AppID.swift.

    ../../_images/ios-demo-voice-2.png
  3. Set your developer signature.

  4. Click the Run button to compile the sample code with real iOS devices.

Executing the Sample Code

You need two phone devices to run the sample code for an audio call. Click the generated App on each iOS devices, and the following screen displays:

../../_images/ios-demo-voice-3.png

You can press the buttons on the screen to mute/unmute yourself or enable the speaker and etc.

Step 4: Demonstrate Video Call

Demonstrate the video call with Agora-iOS-Tutorial-Swift-1to1 sample code in the iOS Full package.

Compiling the Sample Code

  1. Open Agora iOS Tutorial.xcodeproj using Xcode.
../../_images/ios-demo-video-9.png
  1. Enter your App ID in the AppID.swift.
../../_images/ios-demo-video-10.png
  1. Set your developer signature.
  2. Click the Run button to compile the sample code.

Executing the Sample Code

You need two iOS devices to run the sample code for an audio call. Click the generated App on each iOS device, and the following screen displays:

../../_images/ios-demo-video-11.png

You can press the buttons on the screen to switch to audio communication, mute, switch camera and etc.