Hi! I’m trying to see if there’s a way to only have an iOS implementation of a capacitor plugin I’m writing. I understand I can do the not-implemented call responses on Android, but would be helped greatly if there was a way to instead just let the android platform calls route to the web code.
Yes, it’s possible, just remove all the Android java code from the plugin (or the whole android folder), it should fallback to using the web code automatically.
@julio-ionic When I delete /android from the plugin codebase, I am unable to build the main ionic app that the plugin is installed to (fails on sync). I tried fooling around with un-registering the plugin on android side only but it seemed like I was unable to touch that process.
I then tried removing all plugin java code, such that there were two blank java files at src/main/java/com/etc/etc/pluginname/. When I run this, the app tries to execute the java and just continues on, not touching web code. Is there anything I’m missing?
I’ve also tried removing the “android” property in the “capacitor” property in the plugin package.json such that it looked like this:
"capacitor": {
"ios": {
"src": "ios"
}
}
But then nothing runs at all, web or otherwise. Any further ideas?