predicateForObjects(with:)
Returns a predicate that matches the objects with the specified universally unique identifiers (UUIDs).
Declaration
class func predicateForObjects(with UUIDs: Set<UUID>) -> NSPredicateParameters
- UUIDs:
The set of UUIDs to be matched.
Return Value
A predicate that matches the specified objects based on their UUIDs.
Discussion
HealthKit assigns a UUID to each object when it is saved to the HealthKit store. HealthKit uses these IDs to uniquely identify objects from the store. Use this convenience method to create a predicate that checks an object’s UUID against the provided set of UUIDs. The following sample uses both the convenience method and a predicate format string to create equivalent predicates.
See Also
Related Documentation
Creating object predicates
predicateForObject(with:)predicateForObjects(from:)predicateForObjects(from:)predicateForObjects(from:)predicateForObjects(withDeviceProperty:allowedValues:)predicateForObjects(from:)predicateForObjects(withMetadataKey:)predicateForObjects(withMetadataKey:allowedValues:)predicateForObjects(withMetadataKey:operatorType:value:)predicateForObjectsWithNoCorrelation()