predicateForObject(with:)
Returns a predicate that matches an object with the specified universally unique identifier (UUID).
Declaration
class func predicateForObject(with UUID: UUID) -> NSPredicateParameters
- UUID:
The target UUID.
Return Value
A predicate that matches a specific object based on its UUID.
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 matches the object with the provided UUID. The following sample uses both the convenience method and a predicate format string to create equivalent predicates.
See Also
Related Documentation
Creating object predicates
predicateForObjects(with:)predicateForObjects(from:)predicateForObjects(from:)predicateForObjects(from:)predicateForObjects(withDeviceProperty:allowedValues:)predicateForObjects(from:)predicateForObjects(withMetadataKey:)predicateForObjects(withMetadataKey:allowedValues:)predicateForObjects(withMetadataKey:operatorType:value:)predicateForObjectsWithNoCorrelation()