Menu

Expand
Rate this page:

iOS Platform Overview

To make sure your app is ready for iOS 14 please visit this page.

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

Prerequisites

  • Xcode 12.0+
  • Swift projects must use Swift 4.0 or higher
  • Support for iOS 9.0+ at build time, and iOS 11.0+ at run time

Programmable Video Live Demo

Launch our Twilio Programmable Video live demo in less than 5 minutes. A high-quality, full-featured and open-source video collaboration application.

Run the QuickStart app

To get started with Twilio Video, you should download and run a QuickStart Application.

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 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 Twilio Video iOS SDK dynamic framework can be installed using Swift Package Manager, CocoaPods or manually, as you prefer.

Swift Package Manager

You can add Programmable Video for iOS by adding the https://github.com/twilio/twilio-video-ios repository as a Swift Package.

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

As of the latest release of Xcode (currently 12.3), there is a known issue with consuming binary frameworks distributed via Swift Package Manager. The current workaround to this issue is to add a Run Script Phase to the Build Phases of your Xcode project. This Run Script Phase should come after the Embed Frameworks build phase. This new Run Script Phase should contain the following code:

find "${CODESIGNING_FOLDER_PATH}" -name '*.framework' -print0 | while read -d $'\0' framework
do
    codesign --force --deep --sign "${EXPANDED_CODE_SIGN_IDENTITY}" --preserve-metadata=identifier,entitlements --timestamp=none "${framework}"
done

CocoaPods

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

platform :ios, '9.0'

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

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

Manual

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

View all Video iOS Releases here or just download the latest Video dynamic framework here.

Once you've downloaded and unpacked the XCFramework, navigate to your Xcode project's General settings page. Drag and drop TwilioVideo.xcframework onto the Frameworks, Libraries, and Embedded Content section. Ensure that "Copy items if needed" is checked and press Finish. Ensure that "Embed & Sign" is selected.

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

Carthage Integration

Carthage is not currently a supported distribution mechanism for Twilio Video. Carthage does not currently work with .xcframeworks as documented here. Once Carthage supports binary .xcframeworks, Carthage distribution will be re-added.

Background Modes

To allow a connection to a Room to be persisted while an application is running in the background, you must select the Audio, AirPlay, and Picture in Picture background mode from the Capabilities project settings page.

Xcode and iOS Version Support

SDK Version Minimum Xcode Requirement Minimum iOS Version Supported Architectures Supported Devices
4.x Xcode 12.0 iOS 9.0 ** armv7, arm64, i386, x86_64 iPhone 4s and later **, iPad 2 and later, iPad mini (1st generation) and later.
iOS 11.0 arm64, x86_64 iPhone 5s and later *, iPad (5th generation) and later, iPad Air and later, iPad mini 2 and later
3.x Xcode 11.0 iOS 11.0 arm64, x86_64 iPhone 5s and later *, iPad (5th generation) and later, iPad Air and later, iPad mini 2 and later
2.x Xcode 9.0 iOS 9.0 armv7, arm64, i386, x86_64 iPhone 4s and later *, iPad 2 and later, iPad mini (1st generation) and later

* Dual SIM enabled iPhones (XS, XS Max, XR and later) are supported, but not when two SIMs are installed and enabled. See Chromium issue #10966 for more information.

** Build time support is available for iOS 9.x and 10.x. Run time support is available on iOS 11.0 and above.

Getting help

We love feedback and questions especially those with helpful debugging information so we can diagnose and respond quickly. When submitting issues or support tickets, it would be great if you add the following:

  • Description - A description of the issue
  • Steps to reproduce - List the steps necessary to reproduce the issue
  • Code - Include any applicable code snippets that would assist in reproduction and troubleshooting
  • Expected Behavior - What you expect to happen
  • Actual Behavior - What actually happens
  • Reproduces How Often - What percentage of the time does it reproduce?
  • Logs - Any log output when the issue occurs. See below for enabling debug level logging.
  • Video iOS SDK - The version(s) of the Video iOS SDK where this issue is apparent
  • Xcode - The version(s) of Xcode where this issue is apparent
  • iOS Version - The version(s) of iOS where this issue is apparent
  • iOS Device - The iOS device(s) where this issue is apparent
  • Room SID - Room SIDs can be useful for tracing backend issues

After gathering the above information, you can get help in a few ways:

For issues related to the Twilio Video iOS SDK itself:

For issues related to the Twilio Video iOS Quickstarts:

Enabling Debug Logging

To enable debug level logging, add the following code in your application:

TwilioVideoSDK.setLogLevel(.debug)

Migrating from 3.x to 4.x

Our 4.0 releases are now "Generally Available" (GA) and represent our latest releases and adds support for:

  • Upgraded WebRTC version.
  • Swift Package Manager.
  • In-app screen capture.
  • RemoteParticipant reconnection APIs.
  • Recording API improvements.

Our 3.x releases will now only receive critical bug fixes. Support for the 3.x releases will cease as of December 4, 2021. Refer to our 4.x migration guide for migrating your applications from 3.x to 4.x.

Migrating from 2.x to 3.x

Our 3.0 releases are "Generally Available" (GA) and provide the following features:

  • Global low latency (GLL) signaling with IPv4 and IPv6 support.
  • Improved Swift APIs for a more idiomatic Swift development experience.
  • Support for UIScene and multi-window apps on iOS 13 and iPadOS 13.

Our 2.x releases will now only receive critical bug fixes. Support for 2.x releases ended on January 10, 2020. Refer to our 3.x migration guide for migrating your applications from 2.x to 3.x.

Migrating from 1.x to 2.x

Our 2.0 releases are "Generally Available" (GA) and provide the following features:

  • Support for iOS 9.0+
  • H.264 encoding and decoding.
  • Codec preferences.
  • Bandwidth controls.
  • Subscription focused APIs.
  • Track names, Track level errors.
  • Data Tracks.
  • Custom Audio Devices.

Our 1.x releases are no longer supported. Refer to our 2.x migration guide for migrating your applications from 1.x to 2.x and our 3.x migration guide for migrating your applications from 2.x to 3.x.

Rate this page:

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 by visiting our Twilio Community forums or browsing the Twilio tag on Stack Overflow.

        
        
        

        Thank you for your feedback!

        We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

        Sending your feedback...
        🎉 Thank you for your feedback!
        Something went wrong. Please try again.

        Thanks for your feedback!

        Refer us and get $10 in 3 simple steps!

        Step 1

        Get link

        Get a free personal referral link here

        Step 2

        Give $10

        Your user signs up and upgrade using link

        Step 3

        Get $10

        1,250 free SMSes
        OR 1,000 free voice mins
        OR 12,000 chats
        OR more