Skip to main content
The Ant Media Server iOS SDK enables ultra-low latency WebRTC streaming in native iOS applications. Built with Swift/Objective-C compatibility and optimized for iPhone and iPad.

Installation

CocoaPods

Add to your Podfile:
Then run:

Swift Package Manager

Add the package in Xcode:
  1. Go to File > Add Packages
  2. Enter the repository URL: https://github.com/ant-media/WebRTC-iOS-SDK
  3. Select version and add to your project

Manual Installation

  1. Download the latest release from GitHub
  2. Add AntMediaSDK.framework to your project
  3. Link the framework in your target settings

Configuration

Info.plist Permissions

Add required permissions to your Info.plist:

Background Modes

Enable background audio if needed:

Basic Usage

Initialize the SDK

Publishing a Stream

Publish video from the device camera:

Playing a Stream

Play an existing stream:

Video Rendering

Add video views to your interface:

Conference Room

Join a multi-party conference room:

Camera Controls

Control camera and media:

Data Channels

Send and receive real-time data:

Delegate Methods

Implement all delegate methods:

Configuration Options

Video Resolution

Audio/Video Settings

Resources

iOS SDK Repository

View source code, sample apps, and contribute on GitHub

Requirements

  • iOS 12.0 or later
  • Xcode 13.0 or later
  • Swift 5.5+ or Objective-C
  • Camera and microphone hardware
  • Ant Media Server with SSL/TLS configured
WebRTC requires HTTPS in production. Make sure your Ant Media Server has a valid SSL certificate.

Next Steps

Android SDK

Build for Android with the native Android SDK

Authentication

Secure streams with token authentication