Contents

xpc_dictionary_apply(_:_:)

Invokes the specified block for every key-value pair in the dictionary.

Declaration

func xpc_dictionary_apply(_ xdict: xpc_object_t, _ applier: (UnsafePointer<CChar>, xpc_object_t) -> Bool) -> Bool

Parameters

  • xdict:

    The dictionary object which is to be examined.

  • applier:

    The block which this function applies to every key/value pair in the dictionary.

Return Value

A Boolean indicating whether iteration of the dictionary completed successfully. Iteration will only fail if the applier block returns false.

Discussion

You should not modify a dictionary’s contents during iteration. There is no guaranteed order of iteration over dictionaries.

See Also

Dictionary objects