Hello,
I’m developing an iOS app that works with sleep data from Apple Watch via HealthKit. I would like to clarify the following:
-
How can an iPhone app detect when a sleep session ends on the Apple Watch?
-
When is sleep data typically written to the HealthKit store on iPhone after sleep ends? Is it immediately after wake-up, or does it depend on certain conditions (e.g., watch charging, connectivity)?
Understanding the timing and mechanism of sleep data synchronization is crucial for our app to process accurate and timely health information.
Thank you for your assistance.