Closed IvoPelayo closed 5 years ago
@IvoPelayo Thanks for filing this issue, could you please share the version of this plugin that you're using? Is this happening when you're sending a signal from the server side instead of a connected client?
Hi @msach22 i´m currently using 3.4.1 (latest), and I´m sending a signal from a web browser (opentok.js) to a iOS device. With this mods and usign individual signal events, the plugin works like a charm, its just something to have in mind when moving from opentok.js to cordova plugin
Thanks @IvoPelayo - I will update you as we get this fix in
Thanks @IvoPelayo - I'm able to reproduce this issue. The crash happens when either type
or data
are nil
. If you'd like to make a PR with your fix, please include it for type
as well. I'd be happy to review it. If not, I'll patch the plugin.
This has been released with v3.4.3
When running app on iOS device, the signal event causes an exception:
Terminating app due to uncaught exception "NSInvalidArgumentException". Reason: [__NSDictionaryM setObject:forKey:]: object cannot be nil (key:data);
i was able to locate the bug on this method:
I was able to fix this exception by changing this line
[data setObject: string forKey: @"data"];
to this[data setObject: (string == nil) ? @"":string forKey: @"data"];
Now its working, but if I try to catch the signal using this code:
the signal type always says 'signal'. I had to use single subscribers for every signal type like this: