I am working with Apple HealthKit, and I need to add functionality to my app that allows a user's Apple Watch to automatically send the relevant data for their workout session (e.g. vo2 max, start timestamp, end timestamp, heartbeat, duration etc) as soon as they end their workout. This would need to work for any type of workout they do.
E.g. if they are doing a running session, when they end their workout my app needs to receive the data for that running session almost instantly.
I know that enableBackgroundDelivery allows my app to listen to changes in Apple Health in the background, but I'm not sure which method in HealthKit will allow me to implement the above use case.
Does anyone have any pointers? I just want to know what methods in HealthKit will allow me to achieve this.