Contents

enumerateValues(forProperties:using:)

Executes a provided block with the fetched values for the given item properties.

Declaration

func enumerateValues(forProperties properties: Set<String>, using block: @escaping (String, Any, UnsafeMutablePointer<ObjCBool>) -> Void)

Parameters

  • properties:

    A set of property keys that you want the values for.

  • block:

    A block object that executes for each fetched property value.

Discussion

Use this method to get property values in a batch fashion. Anytime the app accesses more than one property, enumerating over a set of property keys is more efficient than fetching each individual property with value(forProperty:).

To see which media property keys you can use with this method, refer to Media entity property keys, General media item property keys, Playlist property keys, and User-defined property keys.

See Also

Working with media properties