I created a HKObserverQuery for HKQuantityTypeIdentifierStepCount.
If I add the count of steps walked wearing the Apple Watch, UpdateHandler of HKObserverQuery is not trigger immediately.
While the app to the active state, UpdateHandler of HKObserverQuery is only called about 2 times per hour.
Its timing is regularly. It seems the next call is just called after 30 minutes even if there is new data in the meantime.
Strange things are ...
When I changed my app to background state and to reactive, updateHandler of HKObserverQuery be called at its timing.
In the case of a number of steps that have been registered in the iPhone is called updateHandler immediately.
This issue occurs by the data of AppleWatch only.
I tried to use timer instead of HKObserverQuery, but did not get the new changed data.
Can I get latest data immediately without app to background?
or is this bug?
Please advise!