Skip to content

notif: Support iOS! #409

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

Merged
merged 9 commits into from
Nov 22, 2023
Merged

notif: Support iOS! #409

merged 9 commits into from
Nov 22, 2023

Conversation

gnprice
Copy link
Member

@gnprice gnprice commented Nov 21, 2023

Fixes #321.


There's one notable limitation in the functionality here, which I've filed as:

Also the permissions prompt comes annoyingly early:

We can fix those in the Beta 2 period.


I've manually tested this with my own Zulip dev server (running main), and it works. Testing notifications with a dev version of the client is kind of a pain, unfortunately (even after the simplifications I made to it this month):
https://github.com/zulip/zulip-mobile/blob/main/docs/howto/push-notifications.md#ios
so for review, given the impending Beta 1, I think it's best to skip that for now — for manual testing we can just rely on what I've done already, and on the next alpha release.


Screenshot of the notifications in Notification Center:

Screenshot 2023-11-21 at 3 46 13 PM

(There were also messages with content "4", "2", and "0". They didn't produce notifications because of #408 -- the app was open in the foreground at the time.)

(The icon needs to be replaced; that's #390.)

@gnprice gnprice added a-iOS Issues specific to iOS, or requiring iOS-specific work a-notifications labels Nov 21, 2023
Copy link
Collaborator

@chrisbobbe chrisbobbe left a comment

Choose a reason for hiding this comment

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

Thanks, looks good! Merging. I agree with one of your TODOs that it would eventually be nice not to have to think about Firebase when reading iOS-notification code. But this seems fine for now.

/// These values are similar to [kFirebaseOptionsAndroid] but are for iOS,
/// and they let us initialize the Firebase library so that we can do that.
///
/// TODO: Cut out Firebase for APNs and use a thinner platform-API binding.
Copy link
Collaborator

Choose a reason for hiding this comment

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

/// TODO: Cut out Firebase for APNs and use a thinner platform-API binding.

Oh good, I think this might be wise to do eventually. 🙂

@chrisbobbe chrisbobbe merged commit 69574ae into zulip:main Nov 22, 2023
@gnprice gnprice deleted the pr-notif-ios branch November 22, 2023 03:23
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
None yet
Development

Successfully merging this pull request may close these issues.

Show notifications on iOS
2 participants