Returns the receiver initialized to a given type using predicates from a given array.


init(type: NSCompoundPredicate.LogicalType, subpredicates: [NSPredicate])



The type of the new predicate.


An array of NSPredicate objects.

Return Value

The receiver initialized with its type set to type and subpredicates array to subpredicates.


For applications linked on macOS 10.5 or later, the subpredicates array is copied. For applications linked on OS X v10.4, the subpredicates array is retained (for binary compatibility).

See Also


init(andPredicateWithSubpredicates: [NSPredicate])

Returns a new predicate formed by AND-ing the predicates in a given array.

init(notPredicateWithSubpredicate: NSPredicate)

Returns a new predicate formed by NOT-ing a given predicate.

init(orPredicateWithSubpredicates: [NSPredicate])

Returns a new predicate formed by OR-ing the predicates in a given array.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software