Swift
Overview
Add the Vonage Video iOS SDK so you can create OTSession, OTPublisher, and OTSubscriber objects and register observability delegates in later steps.
Adding the Vonage Video Library
Swift Package Manager (Recommended)
Add the Vonage Client SDK Video iOS package:
- In Xcode, select File > Add Package Dependencies…
- Enter the repository URL:
https://github.com/opentok/vonage-client-sdk-video.git - Choose the version range recommended in the iOS SDK overview.
- Add the OpenTok library to your app target.
CocoaPods
Tap to expand installation steps
- In Terminal, navigate to your project root and run
pod init. - Edit the Podfile and add:
- Run
pod installand open the.xcworkspacefile.
Import the Library
Create VonageVideoManager.swift and import the SDK:
You will use this file as the central place for session, publisher, subscriber, and observability logic—similar to MainActivity in the Android tutorial.
Client Observability
Learn how to use client observability to monitor real-time quality metrics for a video call with Vonage Video SDK.
Steps
1
Introduction2
Getting Started3
Creating a New Project4
Adding the iOS SDK5
Setting Up Authentication6
Camera and Microphone Access7
Enable Sender Stats on the Publisher8
Subscribe and Register Observability Listeners9
Handle Video Stats10
Display Stats in the UI11
Running the App12
Conclusion