Contents

predicateForObjects(from:)

Returns a predicate that matches any objects that have been associated with the provided workout.

Declaration

class func predicateForObjects(from workout: HKWorkout) -> NSPredicate

Parameters

  • workout:

    The workout you are searching for.

Mentioned in

Return Value

A predicate that matches any objects that have been added to the provided workout.

Discussion

Use this convenience method to create a predicate that matches all the HealthKit objects for a given workout. The following sample uses both the convenience method and a predicate format string to create equivalent predicates.

See Also

Related Documentation

Creating workout predicates