Skip to content

Show notifications when in foreground too, on iOS #408

Open
@gnprice

Description

@gnprice

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    a-iOSIssues specific to iOS, or requiring iOS-specific worka-notifications

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions