Skip to content

Improve TRC APNS push notification reliability#532

Merged
marionbarker merged 1 commit intodevfrom
fix/trc-apns-reliability
Mar 8, 2026
Merged

Improve TRC APNS push notification reliability#532
marionbarker merged 1 commit intodevfrom
fix/trc-apns-reliability

Conversation

@bjorkert
Copy link
Contributor

@bjorkert bjorkert commented Mar 7, 2026

Summary

  • Switch TRC push type from background to alert with visible notification text and time-sensitive interruption level
  • Change apns-expiration from 0 (deliver now or discard) to 600 seconds (retry for 10 min, matching Trio's command validity window)
  • Add apns-collapse-id to prevent duplicate command delivery during connectivity gaps

These changes address reports of remote commands not being received by Trio, especially on cellular or when the app is in the background. Silent/background pushes are aggressively throttled by iOS (blocked in Low Power Mode, limited to ~2-3/hour, not delivered after force-quit). Alert-type pushes with time-sensitive interruption level get reliable, immediate delivery.

No changes required on the Trio side — the same didReceiveRemoteNotification callback fires for both push types.

Switch from silent background pushes to alert-type notifications
to align with how Loop APNS commands are sent, fixing unreliable
delivery especially on cellular and when the app is in background.
Copy link
Collaborator

@marionbarker marionbarker left a comment

Choose a reason for hiding this comment

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

Approve by code review and test.

@marionbarker marionbarker merged commit 222ba3e into dev Mar 8, 2026
@marionbarker marionbarker deleted the fix/trc-apns-reliability branch March 8, 2026 22:52
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