iOS SDK

Important: Please note that your App ID is your API key.

The iOS SDK lets you use Vonage Video API-powered video sessions in apps built for iPad, iPhone, and iPod touch devices.

Important notes:

  • Version 2.29.0+ of the SDK supports iOS 15 or higher.
  • Changes to iOS 14 networking affecting relayed sessions — see the list of known issues in the release notes.
  • Issues using Simulator to preview your app on a Mac with an M1 chip — See the list of known issues in the release notes.

Overview

The iOS client SDK provides the following functionalities:

  • Connecting to session
  • Publishing streams to a session
  • Subscribing to streams in a session

Important: Please note that your App ID is your API key.

  • Changes to iOS 14 networking affecting relayed sessions — see the list of known issues in the release notes.
  • Issues using Simulator to preview your app on a Mac with an M1 chip — See the list of known issues in the release notes.

The iOS SDK is supported on Wi-Fi, 4G/LTE, and 5G connections. The following devices are supported:

  • iPhone -- iPhone 5s and later
  • iPad -- iPad Pro 1st generation and later, iPad (2017), iPad Air (all models), iPad 4th generation, iPad mini 2 and later
  • iPod touch 6th generation and later

The iOS SDK supports one published audio-video stream, one subscribed audio-video stream, and up to three additional subscribed audio-only streams simultaneously on the iPhone 5s (the lowest-end device supported). On the iPhone 7, tests have shown support for subscribing to as many as 20 simultaneous low-resolution (200x200-pixel, 15-frame-per-second) streams. To connect more than two clients in a session using the iOS SDK, create a session that uses the Vonage Video Media Router (a session with the media mode set to routed). See The Vonage Video Media Router and media modes.

Client SDKs are also available for web, Android, Windows, macOS, Linux, and React Native. All Client SDKs can interact with one another. You can learn more about the basics of Vonage Video clients, servers, sessions, and more on the Video API Basics page.

Installing the SDK

The iOS SDK is available as the CocoaPods Pod OTXCFramework, which is distributed as an XCFramework. If you can not use an XCFramework, the OpenTok pod was distributed as a Universal FAT framework but no longer receives updates. The iOS SDK is also available as a Swift Package Manager package, VonageClientSDKVideo. You can install the package by adding the https://github.com/opentok/vonage-client-sdk-video.git repository as a Swift Package Dependency.

The current version of the iOS SDK requires Xcode 10 or higher. The iOS SDK requires the following frameworks and libraries:

  • AudioToolbox.framework
  • AVFoundation.framework
  • CoreGraphics.framework
  • CoreMedia.framework
  • CoreTelephony.framework
  • CoreVideo.framework
  • Foundation.framework
  • GLKit.framework
  • libc++.tbd (libc++.dylib prior to Xcode 7)
  • libsqlite3++.tbd (libsqlite3.dylib prior to Xcode 7)
  • Metal.framework
  • MetalKit.framework
  • MetalPerformanceShaders.framework
  • OpenGLES.framework
  • QuartzCore.framework
  • SystemConfiguration.framework
  • UIKit.framework
  • VideoToolbox.framework

Use the -force_load linker flag to load specific libraries that require it, this is handled for you if you are adding the SDK via CocoaPods or Swift Package Manager.

The 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 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. See the release notes for information on the latest version of the SDK and for a list of known issues.

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 this document for information on using the SDK in apps running in the background mode.

Privacy manifest settings

Version 2.25.5 and newer of the SDK has support for the privacy manifest required by Apple's App store. Using these versions of the SDK, the required privacy-related settings are automatically added when you create your app's privacy report. If you need to use an older version of the SDK, you can manually add the required privacy settings based on the settings in this file to your app's privacy manifest file.

Sample Apps

For samples visit our Swift sample app repo or Objective-C sample app repo on GitHub.

Documentation

You can find detailed documentation of each iOS method in the reference guide.

More information

For a list of new features and known issues, see the release notes.