jefflinwood / twilio_client_phonegap

Phonegap plugins for the Twilio Client iOS and Android SDKs
MIT License
59 stars 53 forks source link

ReferenceError: Can't find variable: Twilio #71

Open lawchihon opened 7 years ago

lawchihon commented 7 years ago

I tried to use your example to try out the plugin: https://github.com/lawchihon/TwilioClientPhoneGapExampleApp

But when I run it, it gives me the error of ReferenceError: Can't find variable: Twilio

If I added the Javascript SDK in index, it will not run the setup at all. <script type="text/javascript" src="//media.twiliocdn.com/sdk/js/client/v1.3/twilio.min.js"></script>

Why would it happen?

My system information:

Cordova CLI: 5.4.1
Gulp version:  CLI version 3.9.1
Gulp local:  
Ionic CLI Version: 1.7.16
Ionic App Lib Version: 0.7.3
ios-deploy version: 1.9.1 
ios-sim version: 5.0.13 
OS: Mac OS X El Capitan
Node Version: v6.10.2
Xcode version: Xcode 8.3.1 Build version 8E1000a 
jefflinwood commented 7 years ago

Hi,

Thanks - you can't use the Twilio Client Javascript SDK directly in a PhoneGap app. Instead you have to include the PhoneGap plugin's Javascript:

                        <script type="text/javascript" src="js/tcPlugin.js"></script>

Can you try that out?

lawchihon commented 7 years ago

Thanks for the quick reply. I am using your example which have included the PhoneGap plugin's javascript in the beginning. Or we need to download the Phonegap plugin somewhere else?

ishan123456789 commented 6 years ago

I've answered my solution here #86