From bd5f4d68dc0cc01dc9adc7f385a604470cf7d20a Mon Sep 17 00:00:00 2001 From: ptank Date: Mon, 19 Sep 2016 16:26:25 -0700 Subject: [PATCH 1/4] Ready changes --- README.md | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 7664766b..0ba448fc 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Looking for Objective-C instead? [Check out this application](https://github.com 3) Get an access token [Generate an Access Token](https://www.twilio.com/user/account/video/dev-tools/testing-tools). Pick your identity (such as Bob). Leave this web page open, because you'll use it as the other side of the video chat. -4) Paste the access token into ViewController.swift +4) Paste the access token into ViewController.swift. 5) Run your app (preferably on an iOS device, but could be on the iOS simulator) @@ -18,21 +18,23 @@ Looking for Objective-C instead? [Check out this application](https://github.com ## What is this project? -This quick start will help you get video chat integrated directly into your iOS applications using Twilio's Video Conversations SDK. This quick start is for Swift developers - if your app uses Objective-C, check out the [Twilio Video Quick Start for Objective-C](https://github.com/twilio/video-quickstart-objc). +This quick start will help you get video chat integrated directly into your iOS applications using Twilio's Video SDK. This quick start is for Swift developers - if your app uses Objective-C, check out the [Twilio Video Quick Start for Objective-C](https://github.com/twilio/video-quickstart-objc). -Inside this quick start project, you will find a View Controller that contains all of the functionality necessary to show two video streams on one iOS screen - one video stream for your phone's video camera, and one for a remote video stream. +The quick start sample is devevloped using Swift 3. You will need XCode verion >= 8.0 to run the applicaiton. -You'll see how to set up key classes like TwilioAccessManager, TwilioConversationsClient, TWCLocalMedia, TWCConversation, and TWCCameraCapturer. All of these Twilio classes have related delegate protocols that the ViewController implements. This will get you all set up to implement a basic video chat in your own app. +Inside this quick start project, you will find a View Controller that contains basic functionality necessary to show two video streams on one iOS screen - one video stream for your phone's video camera, and one for a remote video stream. + +You'll see how to set up key classes like TVIVideoClient, TVIRoom, TVILocalMedia, TVICameraCapturer, TVIVideoTrack, TVIAudioTrack, TVILocalParticipant and TVIParticipant. Some of these Twilio classes have related delegate protocols that the ViewController implements. This will get you all set up to implement a basic video chat in your own app. ## Prerequisites -This project uses Apple's Swift programming language for iOS, and the only supported way to develop iOS apps is on an Apple computer running OS X and XCode. We have tested this application with the latest versions of iOS (9.3.1) and XCode (7.3) at the time of this writing. +This project uses Apple's Swift programming language 3.0 for iOS, and the only supported way to develop iOS apps is on an Apple computer running OS X and XCode. We have tested this application with the latest versions of iOS (9.3.1) and XCode (8.0) at the time of this writing. You do not need to have an Apple iPhone, iPod Touch, or iPad for testing. You can use the iOS Simulator that comes with XCode to do your testing, but the local video camera feed in the app will not work. If you have an iOS device, you can now run apps from XCode on your device without a paid developer account. ## Twilio Library Setup for the Project -You will need to add the Twilio Conversations Client library, and its dependency, the Twilio Commons library to your project for this quick start project to work. There are two different options for doing this: +You will need to add the Twilio Video library, and its dependency, the Twilio Commons library to your project for this quick start project to work. There are two different options for doing this: 1) Using the [Cocoapods](https://cocoapods.org/) dependency management system. @@ -48,7 +50,7 @@ Next, just run `pod install` from the command line in the top level directory of ### Installing Twilio Frameworks -Download the latest versions of the Twilio Conversations and Twilio Commons frameworks from the [Twilio Video SDK Download Page](https://www.twilio.com/docs/api/video/sdks). After uncompressing those download files, drag and drop the frameworks (TwilioCommon.framework and TwilioConversationClient.framework) onto your project in XCode. Make sure that the checkbox next to the VideoQuickstart target is checked. You may want to copy the files if needed into your project as well, so you aren't referencing frameworks from your Downloads folder. +Download the latest version of the Twilio Video [Twilio Video SDK Download Page](https://www.twilio.com/docs/api/video/sdks). After uncompressing those download files, drag and drop the framework (TwilioCommon.framework) onto your project > Target > Embedded Binaries in XCode. Make sure that the checkbox next to the VideoQuickstart target is checked. You may want to copy the files if needed into your project as well, so you aren't referencing frameworks from your Downloads folder. ## Access Tokens and Servers @@ -60,7 +62,7 @@ Using Twilio's Video client within your applications requires an access token. T ### Generating an Access Token -The first step is to [Generate an Access Token](https://www.twilio.com/user/account/video/dev-tools/testing-tools) from the Twilio developer console. Use whatever clever username you would like for the identity. You will get an access token that you can copy and paste into ConversationViewController.m +The first step is to [Generate an Access Token](https://www.twilio.com/user/account/video/dev-tools/testing-tools) from the Twilio developer console. Use whatever clever username you would like for the identity. You will get an access token that you can copy and paste into ViewController.swift. Once you have that access token in place, scroll down to the bottom of the page and you will get a web-based video chat window in the Twilio developer console that you can use to communicate with your iPhone app! Just invite that identity you just named above! @@ -86,14 +88,14 @@ be shown once - make sure to save this in a secure location. Because we suggest that you run your video chat application on actual iOS device so that you can use the camera on the device, you'll need to provide an externally accessible URL for the app (the iOS simulator will be fine with localhost). The [ngrok](https://ngrok.com/) tool creates a publicly accessible URL that you can use to send HTTP/HTTPS traffic to a server running on your localhost. Use HTTPS to make web connections that retrieve a Twilio access token. -When you get a URL from ngrok, go ahead and update ConversationViewController.m with the new URL. If you go down this path, be sure to follow the directions in the comments in the viewDidLoad() method at the top of the source file - you will need to uncomment one line, and comment out another. You will also need to update the code if your ngrok URL changes. +When you get a URL from ngrok, go ahead and update ViewController.swift with the new URL. If you go down this path, be sure to follow the directions in the comments in the viewDidLoad() method at the top of the source file - you will need to uncomment one line, and comment out another. You will also need to update the code if your ngrok URL changes. For this quick start, the Application transport security settings are set to allow arbitrary HTTP loads for testing your app. For production applications, you'll definitely want to retrieve access tokens over HTTPS/SSL. ## Have fun! -This is an introduction to Twilio's Video Conversations SDK on iOS. From here, you can start building applications that use video chat across the web, iOS, and Android platforms. +This is an introduction to Twilio's Video SDK on iOS. From here, you can start building applications that use video chat across the web, iOS, and Android platforms. ## License -MIT \ No newline at end of file +MIT From 5cb4150ae41c339e8670a73ba66bb9fbcfcbd5b8 Mon Sep 17 00:00:00 2001 From: ptank Date: Tue, 20 Sep 2016 13:39:45 -0700 Subject: [PATCH 2/4] Review feedback --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0ba448fc..ee84993e 100644 --- a/README.md +++ b/README.md @@ -20,15 +20,15 @@ Looking for Objective-C instead? [Check out this application](https://github.com This quick start will help you get video chat integrated directly into your iOS applications using Twilio's Video SDK. This quick start is for Swift developers - if your app uses Objective-C, check out the [Twilio Video Quick Start for Objective-C](https://github.com/twilio/video-quickstart-objc). -The quick start sample is devevloped using Swift 3. You will need XCode verion >= 8.0 to run the applicaiton. +The quick start sample is written in Swift 3.0. You will need at least Xcode 8.0 in order to run the application. Inside this quick start project, you will find a View Controller that contains basic functionality necessary to show two video streams on one iOS screen - one video stream for your phone's video camera, and one for a remote video stream. -You'll see how to set up key classes like TVIVideoClient, TVIRoom, TVILocalMedia, TVICameraCapturer, TVIVideoTrack, TVIAudioTrack, TVILocalParticipant and TVIParticipant. Some of these Twilio classes have related delegate protocols that the ViewController implements. This will get you all set up to implement a basic video chat in your own app. +You'll see how how to set up key classes like TVIVideoClient, TVIRoom, TVIParticipant, TVILocalMedia, and TVICameraCapturer. The ViewController implements the TVIRoomDelegate, and TVIParticipantDelegate protocols in order to display remote Participant video on screen. If you are using an iOS device then video from the local camera will be displayed as well. ## Prerequisites -This project uses Apple's Swift programming language 3.0 for iOS, and the only supported way to develop iOS apps is on an Apple computer running OS X and XCode. We have tested this application with the latest versions of iOS (9.3.1) and XCode (8.0) at the time of this writing. +This project uses Apple's Swift programming language 3.0 for iOS, and the only supported way to develop iOS apps is on an Apple computer running OS X and XCode. We have tested this application with the latest versions of iOS (10.0) and XCode (8.0) at the time of this writing. You do not need to have an Apple iPhone, iPod Touch, or iPad for testing. You can use the iOS Simulator that comes with XCode to do your testing, but the local video camera feed in the app will not work. If you have an iOS device, you can now run apps from XCode on your device without a paid developer account. From 4890f51b0542d4c09c74dce285819d10cbe4c143 Mon Sep 17 00:00:00 2001 From: ptank Date: Wed, 21 Sep 2016 01:06:36 -0700 Subject: [PATCH 3/4] review feedback --- README.md | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index ee84993e..8ea9b465 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,9 @@ Looking for Objective-C instead? [Check out this application](https://github.com 1) Create a Twilio Video [Configuration Profile](https://www.twilio.com/user/account/video/profiles). If you haven't used Twilio before, welcome! You'll need to [Sign up for a Twilio account](https://www.twilio.com/try-twilio). -2) Download this project and run `pod install` to install the Twilio frameworks. Open VideoQuickstart.xcworkspace in XCode +2) Download this project and run `pod install` to install TwilioVideo.framework. Open VideoQuickstart.xcworkspace in Xcode -3) Get an access token [Generate an Access Token](https://www.twilio.com/user/account/video/dev-tools/testing-tools). Pick your identity (such as Bob). Leave this web page open, because you'll use it as the other side of the video chat. +3) Generate an [Access Token](https://www.twilio.com/user/account/video/dev-tools/testing-tools). Pick your identity (such as Bob). Leave this web page open, because you'll use it as the other side of the video chat. 4) Paste the access token into ViewController.swift. @@ -20,37 +20,35 @@ Looking for Objective-C instead? [Check out this application](https://github.com This quick start will help you get video chat integrated directly into your iOS applications using Twilio's Video SDK. This quick start is for Swift developers - if your app uses Objective-C, check out the [Twilio Video Quick Start for Objective-C](https://github.com/twilio/video-quickstart-objc). -The quick start sample is written in Swift 3.0. You will need at least Xcode 8.0 in order to run the application. - -Inside this quick start project, you will find a View Controller that contains basic functionality necessary to show two video streams on one iOS screen - one video stream for your phone's video camera, and one for a remote video stream. +This sample app is written in Swift 3.0. You will need at least Xcode 8.0 in order to run the application. You'll see how how to set up key classes like TVIVideoClient, TVIRoom, TVIParticipant, TVILocalMedia, and TVICameraCapturer. The ViewController implements the TVIRoomDelegate, and TVIParticipantDelegate protocols in order to display remote Participant video on screen. If you are using an iOS device then video from the local camera will be displayed as well. ## Prerequisites -This project uses Apple's Swift programming language 3.0 for iOS, and the only supported way to develop iOS apps is on an Apple computer running OS X and XCode. We have tested this application with the latest versions of iOS (10.0) and XCode (8.0) at the time of this writing. +This project uses Apple's Swift programming language 3.0 for iOS, and the only supported way to develop iOS apps is on an Apple computer running OS X and Xcode. We have tested this application with the latest versions of iOS (10.0) and Xcode (8.0) at the time of this writing. -You do not need to have an Apple iPhone, iPod Touch, or iPad for testing. You can use the iOS Simulator that comes with XCode to do your testing, but the local video camera feed in the app will not work. If you have an iOS device, you can now run apps from XCode on your device without a paid developer account. +You do not need to have an Apple iPhone, iPod Touch, or iPad for testing. You can use the iOS Simulator that comes with Xcode to do your testing, but local video will not be shared. If you have an iOS device, you can now run apps from Xcode on your device without a paid developer account. ## Twilio Library Setup for the Project -You will need to add the Twilio Video library, and its dependency, the Twilio Commons library to your project for this quick start project to work. There are two different options for doing this: +You will need to add the Twilio Video library to the project to compile and run. There are two different options for doing this: 1) Using the [Cocoapods](https://cocoapods.org/) dependency management system. -2) Installing the Twilio frameworks yourself, using the directions on the [Twilio Video SDK Download Page](https://www.twilio.com/docs/api/video/sdks) +2) Installing the Twilio Video framework yourself, using the directions on the [Twilio Video SDK Download Page](https://www.twilio.com/docs/api/video/sdks) You only need to do one or the other, not both! ### Using Cocoapods -First, you will need to have Cocoapods installed on your Mac, so go ahead and do that if you haven't already - the directions are here: [Getting Started with Cocoapods](https://guides.cocoapods.org/using/getting-started.html). If you're not sure, type `pod --version` into a command line. +First, you will need to have Cocoapods 1.0.0+ installed on your Mac, so go ahead and do that if you haven't already - the directions are here: [Getting Started with Cocoapods](https://guides.cocoapods.org/using/getting-started.html). If you're not sure, type `pod --version` into a command line. -Next, just run `pod install` from the command line in the top level directory of this project. Cocoapods will install the Twilio libraries and then set up a .xcworkspace file that you will use to run your project from now on. +Next, just run `pod install` from the command line in the top level directory of this project. Cocoapods will install the Twilio library and then set up a .xcworkspace file that you will use to run your project from now on. -### Installing Twilio Frameworks +### Manual Installation -Download the latest version of the Twilio Video [Twilio Video SDK Download Page](https://www.twilio.com/docs/api/video/sdks). After uncompressing those download files, drag and drop the framework (TwilioCommon.framework) onto your project > Target > Embedded Binaries in XCode. Make sure that the checkbox next to the VideoQuickstart target is checked. You may want to copy the files if needed into your project as well, so you aren't referencing frameworks from your Downloads folder. +Download the latest version of Twilio Video from the [SDK Download Page](https://www.twilio.com/docs/api/video/sdks). After uncompressing the downloaded files, drag and drop the framework (TwilioVideo.framework) into your project > Target > Embedded Binaries in Xcode. Make sure that the checkbox next to the VideoQuickStart target is checked. You may want to select the "Copy items if needed" option so you aren't referencing frameworks in your Downloads folder. ## Access Tokens and Servers From 377f98b5fa5686ff0cd22639127c9ad612fd80d1 Mon Sep 17 00:00:00 2001 From: ptank Date: Wed, 21 Sep 2016 01:12:36 -0700 Subject: [PATCH 4/4] review feedback --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8ea9b465..cd65825c 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Looking for Objective-C instead? [Check out this application](https://github.com 1) Create a Twilio Video [Configuration Profile](https://www.twilio.com/user/account/video/profiles). If you haven't used Twilio before, welcome! You'll need to [Sign up for a Twilio account](https://www.twilio.com/try-twilio). -2) Download this project and run `pod install` to install TwilioVideo.framework. Open VideoQuickstart.xcworkspace in Xcode +2) Download this project and run `pod install` to install TwilioVideo.framework. Open VideoQuickStart.xcworkspace in Xcode 3) Generate an [Access Token](https://www.twilio.com/user/account/video/dev-tools/testing-tools). Pick your identity (such as Bob). Leave this web page open, because you'll use it as the other side of the video chat.