Use of altimeter during a workout Session on watch retrieve phone data instead

Hello,

I would like to get the altitude of the watch in order to log its evolutions. To be able to gather data when my app is in background I use a Background workout session and CMAltimeter startRelativeAltitudeUpdates method. I print the receive altitudes with Xcode debug log for now using an iPhone to link the watch to the Mac.

It seems that the values retrieve by my app are not from the watch altimeter but from the phone which is a big problem for my application.

I did the following test :

  • Step 1 : Phone and watch on the table
  • Step 2 : Move the watch on the floor : nothing happens
  • Step 3 : Move the watch back on the table and move the phone to the floor : the altitude change according to the table height
  • Step 4 : Move the watch to the floor (same height than the phone) : no change to the previous value, so retrieve values are not the difference between the phone and the watch altitude

I also try to do the same measure but this time using the Physical Therapy Extended runtime Session and the retrieved values are the one from the watch.

I don't understand how using a workout session can make my app, which is a standalone app, use the phone sensor instead of the watch one.

Thank you for your help,

Coralie

Use of altimeter during a workout Session on watch retrieve phone data instead
 
 
Q