Contents

xpc_array_create(_:_:)

Creates an XPC object that represents an array of XPC objects.

Declaration

func xpc_array_create(_ objects: UnsafePointer<xpc_object_t>?, _ count: Int) -> xpc_object_t

Parameters

  • objects:

    An array of XPC objects which is to be boxed. The order of this array is preserved in the object. If this array contains a NULL value, the behavior is undefined. This parameter may be NULL only if the count is 0.

  • count:

    The number of objects in the given array. If the number passed is less than the actual number of values in the array, only the specified number of items are inserted into the resulting array. If the number passed is more than the the actual number of values, the behavior is undefined.

Return Value

A new array object.

Discussion

This array must be contiguous and cannot contain any NULL values. If you wish to insert the equivalent of a NULL value, you may use the result of xpc_null_create().

See Also

Array objects