iOS Swift WebRTC Client SDK

Important notice: This page is about Nabto Edge WebRTC. While still possible to use WebRTC with Nabto Edge, it is recommended for all new designs to use Nabto WebRTC; this is our dedicated platform for secure, high performance WebRTC signaling and ICE. Using Nabto Edge instead with WebRTC may be meaningful in some scenarios, specifically for adding WebRTC to existing Nabto Edge solutions. Please contact us if you consider using Nabto Edge WebRTC instead of the dedicated Nabto WebRTC platform.

This SDK implements WebRTC, using Nabto Edge Streams for signaling. It wraps the Chromium WebRTC player component for simple integration in your own app.

Installation

Edge Client WebRTC for Swift is currently only available with Swift Package Manager.

To install with Swift Package Manager add the following line to your Package.swift file’s dependencies

.package(url: "https://github.com/nabto/edge-client-swift-webrtc", .branch("main"))

Or add it through XCode by right clicking “Package Dependencies” in the project explorer:

Add the package by entering its URL: https://github.com/nabto/edge-client-swift-webrtc.git:

Usage

The WebRTC Video Streaming Client best practice guide contains Swift example snippets showing how to use the SDK to do WebRTC signaling on an established Nabto Edge connection. And how to use the EdgeMetalVideoView component to display received WebRTC frames.

The source code is available for a simple app that demonstrates using this SDK. This app is also available in the app store for a quick end-to-end demo.