watchOS App Pushed to Foreground After Workout

I built a workout app for watchOS. After finishing the workout, I'm noticing that the system repeatedly pushes the app to the foreground, even if I push the app to the background after the workout. It is unclear why this is happening.

I followed Build a workout app for Apple Watch and I correctly finish the workout as far as I'm aware, with no errors being throw by the system or HealthKit.

What could be causing this behavior? In other words, in what scenario does the system push an app to the foreground (after completing a workout)?

Note that I'm not using WorkoutKit, just HealthKit.

I tested this on a physical device, Apple Watch Series 8, running watchOS 9.6.

It could mean that the workout didn't actually end cleanly. For us to diagnose this, we would need at a minimum a sysdiagnose with the Carousel logging profile. If you can install the Carousel profile from here: https://developer.apple.com/bug-reporting/profiles-and-logs/?platform=watchos, reproduce the problem, and file Feedback with a sysdiagnose, we might be able to figure out what's going on. Sample project would also be useful. Thanks! (Post the FB number here when you have it. :-)

watchOS App Pushed to Foreground After Workout
 
 
Q