Starts a workout session for the current app.
- watchOS 2.0–5.0Deprecated
The workout session to start. You cannot restart a workout session that has stopped. If you pass in a session that is running or has stopped, the system returns an
Workout sessions allow apps to run in the foreground. The current Foreground App appears when the user wakes the watch. Additionally, Apple Watch sets its sensors based on the workout activity and location types for more accurate measurements and better performance.
Apple Watch can only run one workout session at a time. If a second workout is started while your workout is running, your
HKWorkout object receives an HKErrorAnotherWorkoutSession error, and your session ends.
This method returns immediately, however the work is performed asynchronously on an anonymous serial background queue. If successful, the session’s state transitions to
HKWorkout, and the system calls the session delegate’s