This app is a sample video conferencing app that uses the Twilio Programmable Video SDK. The open source app can be easily configured by developers to try out real-time video and audio features. Converting Objective-C code to Swift is in progress.
- Video conferencing with real-time video and audio
- Enable/disable camera
- Mute/unmute mic
- Switch between front and back camera
- Dominant speaker indicator
- Network quality indicator
iOS Deployment Target | Xcode Version | Swift Language Version |
---|---|---|
11.0 | 11.3 | Swift 5 |
The app requires a back-end to generate Twilio access tokens. Follow the instructions below to deploy a serverless back-end using Twilio Functions.
- Install Twilio CLI.
- Run
twilio plugins:install @twilio-labs/plugin-rtc
. - Run
twilio rtc:apps:video:deploy --authentication passcode
. - The passcode that is output will be used later to sign in to the app.
The passcode will expire after one week. To generate a new passcode:
- Run
twilio rtc:apps:video:delete
. - Run
twilio rtc:apps:video:deploy --authentication passcode
.
- Install CocoaPods.
- Run
pod install
.
- Open
VideoApp.xcworkspace
with Xcode. - In Xcode navigate to the Signing & Capabilities pane of the project editor for the
Video-Community
target. - Change
Team
to your team. - Change
Bundle identifier
to something unique.
- In Xcode use the Scheme menu to select the
Video-Community
scheme. - In Xcode use the Scheme menu to select a destination. Cameras do not work in the simulator so select a device for best results.
- Run
⌘R
the app.
The Video-Twilio
and Video-Internal
schemes use authentication that is only available to Twilio employees in order to make internal testing easier.
For each device:
- Run the app.
- Enter any unique name in the
Your name
field. - Enter the passcode from Deploy Twilio Access Token Server in the
Passcode
field. - Tap
Sign in
. - Enter a room name.
- Tap
Join
.
The passcode will expire after one week. Follow the steps below to sign in with a new passcode.
- Generate a new passcode.
- In the app tap
Settings > Sign Out
. - Repeat the steps above.
For unit tests use:
Video-Twilio
scheme.Video-TwilioTests
target.- Quick and Nimble to write unit tests.
- Swift Mock Generator to create mocks.
UI tests require credentials that are only available to Twilio employees.
- Running tests
⌘U
will crash if the app was run⌘R
on the device previously. See issue #12 for a workaround and more details.
Twilio employees should follow these instructions for internal testing.
Apache 2.0 license. See the LICENSE file for details.