Thev Thev - 10 months ago 128
AngularJS Question

ReferenceError: Twilio is not defined

I am trying to implement the Twilio Android and IOS Client SDKs using this plugin. The app is using Cordova, AngularJS and Ionic.

When trying to call the Twilio object within Angular I get the following error:
ReferenceError: Twilio is not defined. The Twilio object is used within a controller inside App.js.

I have imported the plugin in HTML:

<script src="plugins\com.phonegap.plugins.twilioclient\www\tcPlugin.js"></script>

If more information is needed please let me know!

Answer Source

I have found a solution for my problem. I have copied the plugin foldercom.phonegap.plugins.twilioclient from ../YourApp/plugins to the ../YourApp/www/lib.

This has resolved the ReferenceError and I was able to set up a voice call using the Twilio PhoneGap plugin.