HKWorkoutSession and keeping the app in the foreground

Hi eveyrone,

Does anyone have the HKWorkoutSession working to keep a watch app runnning int he foreground? I have a session starting, and the HKWorkoutSessionDelegate that I have implemented with didChangeToState is returning a state of "Running". I am not getting any errors in the other functions implemented (startWorkoutSession success == true and error == nil, didFailWithError does not fire). But alas, about 2 minutes into not using mt watch, the screen comes up to the normal watchface, not my application.

Any thoughts? Not sure if its time to file a bug report as I am very much a newbie to all of this (learning xcode and swift with these betas, never know when it is my fault or if its really a bug, cause I don't know what I'm doing...) 🙂

I see that another developer seems to be experiencing the same issue (last paragraph):

https://forums.developer.apple.com/thread/4975


I'll submit a bug report.

I'm experiencing the same issue.

Any luck with this in beta 2?

Same problem. The app does not remain in the foreground.

HKWorkoutSession and keeping the app in the foreground
 
 
Q