From d6af200e1fce66293f9e803f30c8dcbcb76a0c57 Mon Sep 17 00:00:00 2001 From: Jeffrey Linwood Date: Fri, 14 Jul 2017 10:50:51 -0500 Subject: [PATCH 1/2] Update to use Cordova Cocoapods support --- README.md | 46 +++++++++++++--------------------------------- package.json | 41 +++++++++++++++++++++++++++++++++++++++++ plugin.xml | 13 ++++--------- 3 files changed, 58 insertions(+), 42 deletions(-) create mode 100644 package.json diff --git a/README.md b/README.md index f463ee2..a6c01d5 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ -# Twilio Client Phonegap plugins for iOS and Android (version 1.0.7) +# Twilio Client Phonegap plugins for iOS and Android (version 1.1.0) These are Phonegap plugins that expose the same JS API as Twilio Client for web as much as possible, meaning you should be able to use the same Twilio Client code from your web application inside of your Phonegap application with few if any modifications. # Latest versions tested with this plugin -#### (as of August 16, 2016) -- Cordova 6.3.1 +#### (as of July 14, 2017) +- Cordova 7.0.1 - Cordova Android 5.2.1 -- Cordova iOS 4.1.0 -- Twilio Client for iOS 1.2.8 +- Cordova iOS 4.3.1 +- Twilio Client for iOS 1.2.7 - Twilio Client for Android 1.2.17 -- XCode 7.3 +- XCode 8.3 - Android SDK 23 # Android Gradle Support @@ -27,35 +27,11 @@ https://github.com/jefflinwood/TwilioClientPhoneGapExampleApp # PhoneGap/Cordova Overview -- Install the most recent version of Cordova (as of this writing, 6.3.1 tools - http://http://cordova.apache.org/ -- Install plugman - https://github.com/apache/cordova-plugman - -# Both Platforms at once - -##Instructions -``` -cordova plugin add https://github.com/jefflinwood/twilio_client_phonegap.git -``` - -# iOS only - -##Instructions - -``` - plugman install --platform ios --project platforms/ios --plugin https://github.com/jefflinwood/twilio_client_phonegap.git +- Install the most recent version of Cordova (as of this writing, 7.0.1 tools - http://http://cordova.apache.org/ +# Installation Instructions ``` - - -- After installing the Twilio Client plugin, you will need to download and install the Twilio Client SDK for iOS - follow the directions provided after plugman finishes. - -# Android only - -## Instructions - -``` -plugman install --platform android --project platforms/android --plugin https://github.com/jefflinwood/twilio_client_phonegap.git - +cordova plugin add twilio-client-phonegap-plugin ``` ## Additional Features @@ -77,11 +53,15 @@ Twilio.Connection.setSpeaker("on"); ``` ## Changelog +- 1.1.0 - Utilize Cocoapods framework support for iOS - 1.0.7 - Added Marshmallow/SDK 23 support for runtime permissions - 1.0.6 - Updated Android platform for plugin to pull in Twilio Android SDK using Gradle ## Limitations +The current version of the Twilio Client SDK requires iOS 8.1, but the Cocoapods support in Cordova iOS is +hardcoded to iOS 8.0. Will need to get this addressed in the cordova-ios project. + This is plugin is a first cut and should be considered alpha. Please use it and break it :) Report any issues using the Github issue tracker. Some of the event handlers are currently no-ops because of differences between the web SDK and the iOS SDK, i.e. they both expose events the other does not, e.g. Twilio.Device.cancel is a no-op and there is no JS SDK notion of `-(void)deviceDidStartListeningForIncomingConnections:(TCDevice*)device`, etc. diff --git a/package.json b/package.json new file mode 100644 index 0000000..88bda42 --- /dev/null +++ b/package.json @@ -0,0 +1,41 @@ +{ + "name": "twilio-client-phonegap-plugin", + "version": "1.1.0", + "description": "Use the Twilio Client SDK for iOS or Android VoIP support with Cordova/PhoneGap.", + "cordova": { + "id": "com.phonegap.plugins.twilioclient", + "platforms": [ + "android", + "ios" + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/jefflinwood/twilio_client_phonegap.git" + }, + "keywords": [ + "ecosystem:cordova", + "cordova-android", + "cordova-ios" + ], + "engines": [ + { + "name": "cordova", + "version": ">=6.4.0" + }, + { + "name": "cordova-android", + "version": ">=6.0.0" + }, + { + "name": "cordova-ios", + "version": ">=4.3.0" + } + ], + "author": "Stevie Graham/Lyle Pratt/Jeff Linwood", + "license": "Apache", + "bugs": { + "url": "https://github.com/jefflinwood/twilio_client_phonegap/issues" + }, + "homepage": "https://github.com/jefflinwood/twilio_client_phonegap#readme" +} \ No newline at end of file diff --git a/plugin.xml b/plugin.xml index 7fa4a9e..182cb19 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="1.1.0"> TwilioClient Use the native Twilio Client for iOS or Android with Cordova/PhoneGap and the Twilio Client JavaScript API @@ -50,6 +50,9 @@ + + + @@ -66,13 +69,5 @@ - - -You need to download __Twilio Client for iOS__ from https://www.twilio.com/docs/client/ios. Uncompress the download - you will need to follow a few steps that plugman can not do yet: - -* Add the Twilio Client static libraries (the .a files in the Libraries folder) to your Xcode project - -* Add the Twilio Client headers files (the .h files in the Headers folder) to your Xcode project - From 5b7fe9be4f94ee3e9e8151bc3d8ad3b0d2b9bec7 Mon Sep 17 00:00:00 2001 From: Jeffrey Linwood Date: Thu, 9 Nov 2017 19:29:44 -0600 Subject: [PATCH 2/2] Fix connection disconnect argument --- README.md | 3 ++- package.json | 2 +- www/tcPlugin.js | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a6c01d5..47f4e2d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Twilio Client Phonegap plugins for iOS and Android (version 1.1.0) +# Twilio Client Phonegap plugins for iOS and Android (version 1.1.1) These are Phonegap plugins that expose the same JS API as Twilio Client for web as much as possible, meaning you should be able to use the same Twilio Client code from your web application inside of your Phonegap application with few if any modifications. @@ -53,6 +53,7 @@ Twilio.Connection.setSpeaker("on"); ``` ## Changelog +- 1.1.1 - Fixed Twilio Connection disconnect argument in Javascript file. - 1.1.0 - Utilize Cocoapods framework support for iOS - 1.0.7 - Added Marshmallow/SDK 23 support for runtime permissions - 1.0.6 - Updated Android platform for plugin to pull in Twilio Android SDK using Gradle diff --git a/package.json b/package.json index 88bda42..09f4de4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "twilio-client-phonegap-plugin", - "version": "1.1.0", + "version": "1.1.1", "description": "Use the Twilio Client SDK for iOS or Android VoIP support with Cordova/PhoneGap.", "cordova": { "id": "com.phonegap.plugins.twilioclient", diff --git a/www/tcPlugin.js b/www/tcPlugin.js index 25551d0..b483686 100644 --- a/www/tcPlugin.js +++ b/www/tcPlugin.js @@ -107,7 +107,7 @@ Cordova.exec(null,null,"TCPlugin","rejectConnection",[]); } - TwilioPlugin.Connection.prototype.disconnect = function(fn) { + TwilioPlugin.Connection.prototype.disconnect = function(argument) { if (typeof(argument) == 'function') { delegate['onconnectiondisconnect'] = argument; } else {