Skip to content

Show notifications when in foreground too, on iOS #408

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

Open
gnprice opened this issue Nov 21, 2023 · 0 comments
Open

Show notifications when in foreground too, on iOS #408

gnprice opened this issue Nov 21, 2023 · 0 comments
Labels
a-iOS Issues specific to iOS, or requiring iOS-specific work a-notifications

Comments

@gnprice
Copy link
Member

gnprice commented Nov 21, 2023

In my draft implementation of #321, we show notifications only if they arrive while the app is either in the background or not running; we don't show them if they arrive while the app is in the foreground.

This is the default behavior iOS provides, which is why that's what we get in that draft. But it doesn't seem like the right behavior for Zulip, for reasons described at zulip/zulip-mobile#3114 (comment) . So we should arrange to have notifications be shown while the app is in the foreground, too.

This is done by implementing a certain method on our iOS app delegate, the class found at ios/Runner/AppDelegate.swift. See zulip-mobile's implementation at zulip/zulip-mobile@d4606ab .

In this case Flutter provides its own implementation of that method, with the FlutterAppDelegate class that our AppDelegate inherits from. That implementation in turn has a protocol for Flutter plugins to provide implementations to be called. I haven't yet looked much into this, and I'm not sure if it'd be better to (a) use that protocol, providing an implementation to be called by that Flutter-provided mechanism, or (b) override that Flutter-provided implementation with our own.

@gnprice gnprice added a-iOS Issues specific to iOS, or requiring iOS-specific work a-notifications labels Nov 21, 2023
@gnprice gnprice added this to the Beta 2 milestone Nov 21, 2023
@gnprice gnprice modified the milestones: Beta 2, Beta 3 Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-iOS Issues specific to iOS, or requiring iOS-specific work a-notifications
Projects
Status: No status
Development

No branches or pull requests

1 participant