<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: -",
    "watchOS: 5.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "HealthKit",
  "identifier" : "/documentation/HealthKit/HKLiveWorkoutBuilder/shouldCollectWorkoutEvents",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "HealthKit"
    ],
    "preciseIdentifier" : "c:objc(cs)HKLiveWorkoutBuilder(py)shouldCollectWorkoutEvents"
  },
  "title" : "shouldCollectWorkoutEvents"
}
-->

# shouldCollectWorkoutEvents

A Boolean value that determines whether the workout builder automatically adds events generated by the workout session.

```
var shouldCollectWorkoutEvents: Bool { get set }
```

## Discussion

By default, this property is <doc://com.apple.documentation/documentation/Swift/true>. Set it to <doc://com.apple.documentation/documentation/Swift/false> if your app adds its own events to the workout builder, and you want to ignore events from the workout session.

You must set this property before calling the workout builder’s [`beginCollection(withStart:completion:)`](/documentation/HealthKit/HKWorkoutBuilder/beginCollection(withStart:completion:)) method.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)