-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugin crashes when used in Capacitor #29
Comments
It looks like Cordova says it's deprecated because it doesn't properly use a bi-directional bridge, but we're just firing an event so that's probably fine for this use case. |
Wow, thanks for the super fast response! This does work in iOS so I believe they have implemented something there that will allow running javascript, so it feels like a missing implementation in android rather than something that is on purpose... |
Checking for null and falling back is probably the safest option. Would protect us if Cordova ever decides to drop the deprecated API. I'm curious to hear what the Capacitor team replies, but it would be nice to be compatible with existing versions of Capacitor. |
I've opened a PR for the fix. |
Fix Capacitor issue when engine is null. Fixes #29.
Hi,
I'm migrating to capacitor but haven't found a good equivalent to this plugin there.
Unfortunately this plugin crashes in Capacitor environment as can be read in the following bug I opened there:
ionic-team/capacitor#5811
Is there a different way this plugin could send the message without using the webview engine? Maybe some "regular" plugin event that one would register in the js code?
It will be more specific to this plugin, but more readable if one reads the code as it's not a "weird" regular javascript message but rather a plugin callback which is "obvious" that it is part of the plugin API.
If this is something that might interest you, I might be able to send a PR...
The text was updated successfully, but these errors were encountered: