-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[Bug]: for plugins the removeAllListeners function does not exist on iOS #7435
Comments
The provided app doesn't include any Are you sure you updated correctly? looks like you updated your plugins to Capacitor 6 but you are still using |
Sorry my bad I wasn't using the src dir, I modified the repository to show the issue. I just put everything in Below screenshot of what happens when running on iOS vs. Android emulator |
This issue has been labeled as |
Oh, yeah, since you changed the sample to not import the plugin, the common methods like I guess we could generate it from native too as we do for But if you import the plugin, the |
One of our projects is really old and "vanilla" javascript, not using modules. So we'd have to find a way to include that generated plugin code without imports. Still, isn't it strange that that same sample project, so without importing the plugin, does seem to work on Android? In the sense that the function is not undefined as you can see in the 2nd screenshot. |
This is an iOS issue only, on Android the plugins methods have annotations that auto generate the javascript and |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out. |
Capacitor Version
[warn] The bundledWebRuntime configuration option has been deprecated. Can be safely deleted.
💊 Capacitor Doctor 💊
Latest Dependencies:
@capacitor/cli: 6.0.0
@capacitor/core: 6.0.0
@capacitor/android: 6.0.0
@capacitor/ios: 6.0.0
Installed Dependencies:
@capacitor/cli: 6.0.0
@capacitor/core: 6.0.0
@capacitor/ios: 6.0.0
@capacitor/android: 6.0.0
[success] iOS looking great! 👌
[success] Android looking great! 👌
Other API Details
Platforms Affected
Current Behavior
On iOS the
removeAllListeners()
function on plugins isundefined
, whereas on Android it exists as expected.I reproduced for PushNotifications but also checked it via console for built-in plugins like Camera.
Maybe has to do with this: https://capacitorjs.com/docs/updating/plugins/6-0#remove-removealllisteners-method
Expected Behavior
The
removeAllListeners()
function should work the same on iOS and Android.Project Reproduction
https://github.com/JanMisker/TestPushNotifRemoveAll
Additional Information
No response
The text was updated successfully, but these errors were encountered: