Skip to content

(ios) Display multiple notifications for multiple BG payments#724

Merged
robbiehanson merged 1 commit intomasterfrom
multiple-notifications
Jun 17, 2025
Merged

(ios) Display multiple notifications for multiple BG payments#724
robbiehanson merged 1 commit intomasterfrom
multiple-notifications

Conversation

@robbiehanson
Copy link
Contributor

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:

  • it updates the remote notification with info from payment 1
  • it creates and displays a local notification with info from payment 2

@robbiehanson robbiehanson requested a review from dpad85 June 9, 2025 16:05
@robbiehanson robbiehanson merged commit f18f4a3 into master Jun 17, 2025
@robbiehanson robbiehanson deleted the multiple-notifications branch June 17, 2025 16:35
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.

2 participants