PriceFallin / cordova-plugin-twilio-video

Cordova plugin for Twilio Video
16 stars 31 forks source link

Tap Gesture crashes app #5

Closed cavalryjim closed 6 years ago

cavalryjim commented 6 years ago

I have successfully installed the plugin along with TwilioVideo.framework version 1.4 (& associated frameworks). I have also successfully conducted a video call between two iPhones via an Ionic app (ionic version 3.20.0)

During the video call, tap gestures on the mute, camera, toggle, and end icons seem to be working correctly but tap gestures elsewhere on the screen cause the app to crash. The troublesome tap gesture seems to trigger a dismissKeyboard action.

Xcode output:

[TwilioVideoViewController dismissKeyboard]: unrecognized selector sent to instance 0x103352fb0
2018-06-04 16:41:17.938204-0500 relief_app[783:269693] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[TwilioVideoViewController dismissKeyboard]: unrecognized selector sent to instance 0x103352fb0'
*** First throw call stack:
(0x18464e364 0x183894528 0x18465b828 0x18def021c 0x184653d10 0x184538ecc 0x18e1cccd0 0x18e1d12c4 0x18dca9aa8 0x18db60c38 0x18e1bab34 0x18e1ba6a4 0x18e1b9800 0x18db5ef44 0x18db2ff64 0x18e48531c 0x18e4878a8 0x18e4807c0 0x1845f697c 0x1845f68fc 0x1845f6184 0x1845f3d5c 0x184513e58 0x1863c0f84 0x18db9367c 0x10209c2e0 0x18403056c)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 
cavalryjim commented 6 years ago

Here is a solution: In my fork of the plugin, I commented out the dismissKeyboard tap gesture in the file TwilioVideoViewController.m

// UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(dismissKeyboard)];
   // [self.view addGestureRecognizer:tap];

remove & add the plugin

ionic cordova plugin remove cordova-plugin-twilio-video
ionic cordova plugin add ../cordova-plugin-twilio-video

Seems to be working.

cavalryjim commented 6 years ago

Additional note: I also moved to version 1.3.11 of the Twilio iOS SDK to match a working install by @PriceFallin

cavalryjim commented 6 years ago

Twilio SDK v. 1.4 works with my fix also.