(ios) Display multiple notifications for multiple BG payments#724
Merged
robbiehanson merged 1 commit intomasterfrom Jun 17, 2025
Merged
(ios) Display multiple notifications for multiple BG payments#724robbiehanson merged 1 commit intomasterfrom
robbiehanson merged 1 commit intomasterfrom
Conversation
…received payment.
dpad85
approved these changes
Jun 12, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reminder: On iOS there is a separate process (called a notification service extension) that handles receiving payments if the Phoenix app is in the background or isn't running at all.
The previous architecture did NOT do a good job displaying notifications IF multiple payments were received at the same time.
For example: if you send 2 payments to the same wallet at the same time, the receiving device will display a generic push notification that says "multiple payments received" (which is not ideal). Furthermore, if our server sends multiple push notifications to the device, then a second notification will be displayed that says "missed incoming payment" (which is incorrect).
This PR fixes the problem. Now the device will always display a separate push notification for each received payment. Which is more inline with user expectations. Also, if the server sends multiple notifications, they are handled properly by the device.
Technical details:
A "notification service extension" is designed to modify the content of a single remote push notification. However, it's also allowed to add or remove from the list of local notifications.
So if 2 payments arrive while processing a notification then: