Desired Behavior
I want the app to be able to handle multiple Push-to-Start notifications even when it is completely terminated. Each Live Activity should:
Be successfully displayed upon receiving a Push-to-Start notification.
Trigger background tasks to send its update token to the server, regardless of the time interval between notifications.
Problem
I am facing an issue with iOS Live Activities when using Push-to-Start notifications to trigger Live Activities in an app that has been completely terminated. Here’s the detailed scenario:
When the app is completely terminated and I send the first Push-to-Start notification:
The Live Activity is successfully displayed.
didFinishLaunchingWithOptions` is triggered, and background tasks execute correctly, including sending the update token to the server.
When I send consecutive Push-to-Start notifications in quick succession (e.g., within a few seconds or minutes):
Both notifications successfully display their respective Live Activities.
Background tasks are executed correctly for both notifications.
However, when there is a longer interval (e.g., 10 minutes) between two Push-to-Start notifications:
The first notification works perfectly—it displays the Live Activity, triggers didFinishLaunchingWithOptions, and executes background tasks.
The second notification successfully displays the Live Activity but fails to execute any background tasks, such as sending the update token to the server.
My HypothesisI
suspect that iOS might impose a restriction where background runtime for Push-to-Start notifications can only be granted once within a certain time frame after the app has been terminated.
Any insights into why this issue might be occurring or how to ensure consistent background task execution for multiple Push-to-Start notifications would be greatly appreciated!
Selecting any option will automatically load the page