Live Activity Dissappearing

Hello,

I am experiencing an issue with the Live Activity feature in my application. Despite extensive debugging efforts, the problem persists, and I would greatly appreciate your assistance.

Here are the key details of the issue:

  1. We are not using APNS; everything related to Live Activities is handled locally within the app.
  2. The Live Activity displays task details, including: Task title, icon and A label functioning as a timer that shows the remaining time in seconds for the task.
  3. The Live Activity appears as expected when the app is opened. However, when the app is sent to the background, the Live Activity does not appear consistently. It disappears unexpectedly in some random instances.

I have tried various debugging methods, including:

  1. Ensuring the activity is correctly created and updated as per the Apple Documentation.
  2. Verifying the ActivityAttributes and ActivityContentState configurations.
  3. Testing with different app lifecycle events to determine when the issue occurs.

Despite these efforts, the issue remains unresolved, and the cause is unclear. The app behavior seems inconsistent, as the Live Activity sometimes remains visible and at other times disappears when the app is backgrounded.

I would greatly appreciate your help in understanding and addressing this issue. Specifically:

  1. Are there any system-level constraints or conditions that could cause a Live Activity to terminate when the app is backgrounded?
  2. Are there best practices or configurations to ensure the persistence of locally managed Live Activities?
  3. Can you suggest additional debugging techniques or tools that could help identify the root cause?

Thank you for your time and support. Please let me know if further information or logs are needed to assist in troubleshooting

Hi,

The best first course of action here would be to use Console.app to monitor to the relevant processes related to your app and extensions.

A good way to start would be with filtering by the BundleID of the target and / or the target name itself (the process name).

Also be sure to check the system processes for additional information. This will vary based on what and where you are looking but some examples:
To debug APNS you'll want to monitor apd along with other relevant processes.
To debug WidgetKit, LiveActivities, Dynamic Island you'll want to monitor springboardd, liveactivitiesd along with other relevant processes.

Rico


WWDR | DTS | Software Engineer

Live Activity Dissappearing
 
 
Q