13. WorkoutSession
class HKWorkoutSession: NSObject {
var activityType: HKWorkoutActivityType { get }
var locationType: HKWorkoutSessionLocationType { get }
weak var delegate: HKWorkoutSessionDelegate?
var state: HKWorkoutSessionState { get }
init(activityType: HKWorkoutActivityType,
locationType: HKWorkoutSessionLocationType)
}
14. WorkoutActivityType
enum HKWorkoutActivityType : UInt {
case Basketball
case Fishing
case Gymnastics
case Hunting
case MartialArts
case Running
case Soccer
case Swimming
case Walking
case Yoga
…
case Other
}
26. Howto Debug
Better debug on device, not simulator
Because
- Setting location to City Run or City Bicycle Ride
doesn't work for HealthKit
- Need to save data in HealthKit manually
- Big behavior differences between device and
simulator
28. Can notattachto process on
device
“Did the 'trust this computer' diaglog ever show on
the watch? Unpairing and then re-pairing and
restarting Xcode should have gotten you that prompt.
The symptoms you are experiencing seem to indicate
that this dialog was not presented after you
upgraded.”
On device watchOS debugging impossible