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:
- We are not using APNS; everything related to Live Activities is handled locally within the app.
- 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.
- 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:
- Ensuring the activity is correctly created and updated as per the Apple Documentation.
- Verifying the ActivityAttributes and ActivityContentState configurations.
- 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:
- Are there any system-level constraints or conditions that could cause a Live Activity to terminate when the app is backgrounded?
- Are there best practices or configurations to ensure the persistence of locally managed Live Activities?
- 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
STEPS TO REPRODUCE
- Download and Install the Owaves App from the App Store.
- Create a Live Activity:
- Open the app and create an activity for the current time on Today.
- Example: If the current time is 9:30 AM, create an activity with a time range such as 9:00 AM - 10:00 AM to ensure it is live.
- Enable Live Activity:
- Tap on the newly created activity to open the Event Details page.
- Scroll to the bottom of the page and locate the toggle switch labeled "Live Activity".
- Switch the toggle to the ON position to enable the Live Activity.
- Background the App:
- Send the app to the background.
- Check the Lock Screen:
- Swipe down to enable iOS' Lock Screen and check for the Live Activity from the Owaves app.
- Repeat the Steps:
- If the Live Activity appears on the Lock Screen initially, repeat steps 3-5 multiple times.
- Eventually, you will encounter instances where the Live Activity does not appear on the Lock Screen, despite following the same process