Returns a predicate that matches all the objects that were created by any of the provided devices.
- iOS 9.0+
- watchOS 2.0+
A set of devices that have generated the data for objects stored in the HealthKit store.
A predicate that matches all the objects that store data generated by any of the provided devices.
When creating the device objects for this predicate, only pass in values for the parameters you need for your query. HealthKit returns all the devices that match the non-
nil parameters. This gives you a great deal of control when it comes to fine tuning your query. For example, setting the
local and the
firmware parameters lets you query for all the samples generated by a specific device running a specific version of the firmware. Just setting the
model casts a much broader net.
The following sample uses both the convenience method and a predicate format string to create equivalent predicates.