The Vonage Video API iOS SDK lets you use Vonage Video API-powered video sessions in apps you build for iPad, iPhone, and iPod touch devices.
Important notes:
This page covers the following topics:
The OpenTok iOS SDK lets you use OpenTok-powered video sessions in apps you build for iPad, iPhone, and iPod touch devices.
All applications that use the Vonage Video API are composed of two parts:
The client SDK for building iOS apps is the OpenTok iOS SDK, which provides most of the core functionality for your app, including:
Client SDKs are also available for web, Android, iOS, Windows, macOS, Linux, and React Native. All OpenTok client SDKs can interact with one another.
You can learn more about the basics of OpenTok clients, servers, sessions, and more on the Video API Basics page.
The best way to learn how to use the OpenTok iOS SDK is to follow the OpenTok Basic Video Chat tutorial:
Once you understand the basics of building with the OpenTok iOS SDK, you can get more detailed information and learn how to customize your application with the OpenTok developer guides. To investigate specific API classes and methods, see the OpenTok iOS SDK API reference.
For samples using Swift, visit our Swift sample app repo on GitHub.
For samples using Objective-C, visit our Objective-C sample app repo on GitHub.
Apps written with the OpenTok iOS SDK 2.33.0 can interoperate with OpenTok apps written with version 2.31+ of the OpenTok client SDKs:
The OpenTok iOS SDK is supported in iOS 15 or higher.
The OpenTok iOS SDK is supported on Wi-Fi, 4G/LTE, and 5G connections.
The OpenTok.framework directory contains the OpenTok iOS SDK.
The OpenTok iOS SDK supports XCFramework artifacts and is available as the Pod "OTXCFramework", for use with CocoaPods. It is also available as a Swift Package Manager package: https://github.com/vonage/vonage-video-client-sdk-swift.git.
The OpenTok iOS SDK requires Xcode 7 or higher.
The OpenTok iOS SDK requires the following frameworks and libraries:
The OpenTok iOS SDK links to the libc++ standard library. If another library that links to the libc++ standard library was compiled in a version of Xcode older than 6.0.0, it may result in segfaults at run time when using it with the OpenTok iOS SDK. Known incompatible libraries include, but are not limited to, Firebase (versions earlier than 2.1.2 -- see https://code.google.com/p/webrtc/issues/detail?id=3992) and Google Maps (versions earlier than 1.9.0). To fix this issue, download a version of the other library that was compiled using XCode 6.0.0 or later.
If you are using a version of Xcode prior to 7.2.0, do not use the -all_load
linker flag. Instead, use the -force_load linker flag to load specific
libraries that require it.
In order to access the camera and microphone, iOS 10 requires you to set values
for the NSCameraUsageDescription and NSMicrophoneUsageDescription keys in
the Info.plist file. These define strings that appear in the app installer to
inform the user why your app uses the camera and microphone. For more
information see the Apple documentation on Cocoa
keys.
See the release notes for information on the latest version of the SDK and for a list of known issues.
See this content for information on using the SDK in apps running in the background mode.
For reliable video streaming, ensure your device meets these recommended specs:
These recommendations ensure stable playback, lower CPU usage, and smooth performance when streaming video.
Device examples: iPhone XS or newer (2018+), iPad Pro (any generation), iPad Air 3 or newer, iPad mini 5 or newer.
The OpenTok iOS SDK 2.33.0+ is supported on Apple silicon Macs (M1, M2, M3, and later) running macOS 14 or later. On macOS, the SDK offers most of the same features available on iOS devices, though there are a few platform-specific differences and limitations to keep in mind.
Camera Behavior on macOS
macOS devices typically have a single built-in camera (the FaceTime camera), which is always mapped as the front camera (AVCaptureDevicePositionFront). External cameras connected to the Mac are also treated as front cameras.
Important considerations:
cameraPosition property will always resolve to front camera on macOSRotation Handling
Warning: macOS devices do not support automatic orientation rotation like iOS mobile devices.
Torch (Flashlight) Limitation
Warning: The camera torch (flashlight) feature is not available on macOS.
cameraTorch property to YES will have no effect on macOSFor samples using Swift, visit our Swift sample app repo on GitHub.
For samples using Objective-C, visit our Objective-C sample app repo on GitHub.
Reference documentation is included in the doc subdirectory of the SDK and at http://www.tokbox.com/developer/sdks/ios/reference/index.html.
For a list of new features and known issues, see the release notes.