Platform Overview

Twilio's Programmable Video iOS SDK lets you add real time voice and video to your native iOS applications.

Prerequisites

  • Xcode 8.1+
  • Swift projects must use Swift 3.0 or higher
  • CocoaPods 1.0.0+
  • Support for iOS 8.1+

Run the QuickStart app

To get started with Twilio Video, you should download and run a QuickStart application [Swift, Objective-C].

Using a Simulator

You can use the iOS Simulator that comes with Xcode to do your testing, but local video will not be shared since the Simulator cannot access a camera. If you have an iOS device, you can now run apps from Xcode on your device without a paid developer account.

The QuickStart repository [Swift, Objective-C] contains additional examples. These examples demonstrate the usage of new features and also let you build more complex applications.

To add Video to your app, follow the Getting Started Guide

Add the SDK

The iOS Video framework can be installed using CocoaPods or manually, as you prefer.

CocoaPods

source 'https://github.com/CocoaPods/Specs'

platform :ios, '8.1'

target 'TARGET_NAME' do
    pod 'TwilioVideo', '~> 1.0'
end

Then run pod install to install the dependencies for your project.

Manual

TwilioVideo.framework is distributed as a dynamic iOS framework that you can drag and drop into your existing projects.

Download the Video framework here

Once you've downloaded and unpacked the framework, navigate to your Xcode project's General settings page. Drag and drop TwilioVideo.framework onto the Embedded Binaries section. Ensure that "Copy items if needed" is checked and press Finish. This will add TwilioVideo.framework to both the Embedded Binaries and Linked Frameworks and Libraries sections.

Next, you will need to open your project's Linked Frameworks and Libraries configuration. You should see the TwilioVideo.framework there already. Add the following frameworks to that list:

  • AudioToolbox.framework
  • VideoToolbox.framework
  • AVFoundation.framework
  • CoreTelephony.framework
  • GLKit.framework
  • CoreMedia.framework
  • SystemConfiguration.framework
  • libc++.tbd

In your Build Settings, you will also need to modify "Other Linker Flags" to include -ObjC.

Before distributing your app to the  App Store, you will need to strip the simulator binaries from the embedded framework. Navigate to your target's Build Phases screen and create a new "Run Script Phase". Ensure that this new run script phase is after the Embed Frameworks phase. Paste the following command in the script text field:

/bin/bash "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/TwilioVideo.framework/remove_archs"

Supported Devices

The iOS SDK supports iOS 8.1 or higher. It is built for armv7, arm64, x86 and x86_64 architectures with Bitcode slices for armv7 and arm64 devices. Devices based on the A5 SoC (iPhone 4s, iPad 2, iPad Mini 1, iPod Touch 5G) are not supported, and the SDK will not perform well on them.

Preview Releases

The Programmable Video iOS SDK is available in two versions. Our 1.x releases are "Generally Available" (GA) and represent stable APIs that are supported with bug fixes. Our 2.0 release is currently in developer preview and adds support for features like:

  • H.264 encoding and decoding.
  • Codec preferences.
  • Bandwidth controls.
  • Subscription focused APIs.
  • Track names, Track level errors.
  • Data Tracks.

Take a look at the Changelog to learn more.

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.