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

fix(ios): do not show notifications when in foreground #209

Merged
merged 1 commit into from
Jan 22, 2021

Conversation

jcesarmobile
Copy link
Member

In Capacitor 2, push notifications where not shown when the app was in foreground (by default, but can be configured to show them)
This PR changes the behavior to do the same

closes #208

@imhoffd
Copy link
Contributor

imhoffd commented Jan 22, 2021

I think this was intentional. @theproducer was this to fix a reported issue?

@theproducer
Copy link
Contributor

No, it wasn't based on any reported issue.

push notifications where not shown when the app was in foreground (by default, but can be configured to show them)

This I did not realize, sorry!

Copy link
Contributor

@theproducer theproducer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see the mistake I made: returning presentationOptions returns the config options for how to display notifications - outside of that I should simply returned an empty options set.

@imhoffd imhoffd changed the title fix(push-notifications): Don't show notification when in foreground fix(ios): do not show notifications when in foreground Jan 22, 2021
@imhoffd imhoffd merged commit 1994997 into main Jan 22, 2021
@imhoffd imhoffd deleted the dont-show-foreground branch January 22, 2021 22:39
hmaretic24 pushed a commit to hmaretic24/capacitor-plugins that referenced this pull request Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Push notification is shown when the app is in foreground
3 participants