Hi! I've added the code of the multidevice workout app from Apple to my app and I found some issues that I cannot see on the sample app.
In my app, to pause or end the workout from the watch, the iOS companion app has to be opened or at least on background, but never closed.
What I'm doing wrong?
Assuming the Apple sample you mentioned is Building a multidevice workout app, it contains a standard iOS app to its companion watchOS app. Other than using HealthKit, the apps don't do anything special.
In the case where your app doesn't behave the same as our sample, an effective way to find the reason is that you figure out how you do differently by comparing the two projects. If the difference isn't obvious, you can try to gradually add your code or apply your configuration to the Apple sample, until the issue reproduces. You can also try the other way around – reducing your project, until the issue disappears.
If you still need help after finding what you do differently, feel free follow up here and I would take a closer look.
Best,
——
Ziqiao Chen
Worldwide Developer Relations.