Skip to content
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

removeAllListeners has CAPPluginReturnNone on iOS #751

Closed
jcesarmobile opened this issue Jan 7, 2022 · 4 comments
Closed

removeAllListeners has CAPPluginReturnNone on iOS #751

jcesarmobile opened this issue Jan 7, 2022 · 4 comments
Labels
platform: ios type: bug A confirmed bug report

Comments

@jcesarmobile
Copy link
Member

Bug Report

Plugin(s)

app
browser
keyboard
local-notifications
network
push-notifications
screen-reader

Capacitor Version

3

Platform(s)

iOS

Current Behavior

removeAllListeners has CAPPluginReturnNone return type on iOS

Expected Behavior

removeAllListeners should have CAPPluginReturnPromise return type on iOS as types say they return a promise

Code Reproduction

Other Technical Details

Additional Context

it also needs
related to ionic-team/capacitor#5357

@trackmyapp
Copy link

Does this mean removeAllListeners doesn't work on ios?
For me it seems not to work, push-notifications are still received and displayed by the device after calling ushNotifications.removeAllListeners()
The promise resolves with "-1".

@jcesarmobile
Copy link
Member Author

no, it works, just won't be able to catch an error if it fails for some reason

the listener just allow you to get the push notification data, but removing the listener doesn't prevent the app from receiving push notifications

@jcesarmobile jcesarmobile added the type: bug A confirmed bug report label Feb 24, 2022
@jcesarmobile
Copy link
Member Author

this has been fixed in 4.0.0 beta 0

@ionitron-bot
Copy link

ionitron-bot bot commented Sep 30, 2022

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 the plugin, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
platform: ios type: bug A confirmed bug report
Projects
None yet
Development

No branches or pull requests

3 participants