stevegraham / twilio_client_phonegap

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

Incoming Calls - typedef undefined error from Cordova #6

Open jefflinwood opened 11 years ago

jefflinwood commented 11 years ago

Looks like onincoming isn't working with the 2.9 changes - I haven't tried it with the original code (with the 1.5 version), so I'm thinking that something internal to how Cordova handles returning messages to Javascript has changed.

My client code works with the Twilio Client javascript, so I can at least use that for testing.

kzfabi commented 11 years ago

I had an issue with incoming calls using the latest version of the plugin where the call was being received but unable to be answered using "connection.accept();" in JavaScript. I resolved this modifying the "TCPlugin.m" file on method "didReceiveIncomingConnection". Problem was that the received connection was not being stored. I added "self.connection = connection;" before invoking the JavaScript callback. After this, I started having calls hearing voice from both sides.

kzfabi commented 11 years ago

Here's a link to the file and line: https://github.com/stevegraham/twilio_client_phonegap/blob/master/iOS/TCPlugin.m#L39