<!--
{
  "availability" : [
    "iOS: 3.0.0 -",
    "iPadOS: 3.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.4.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSCompoundPredicate/init(andPredicateWithSubpredicates:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSCompoundPredicate(cm)andPredicateWithSubpredicates:"
  },
  "title" : "init(andPredicateWithSubpredicates:)"
}
-->

# init(andPredicateWithSubpredicates:)

Returns a new predicate that you form using an AND operation on the predicates in a specified array.

```
init(andPredicateWithSubpredicates subpredicates: [NSPredicate])
```

## Parameters

`subpredicates`

An array of `NSPredicate` objects.

## Return Value

A new predicate formed by AND-ing the predicates specified by `subpredicates`.

## Discussion

An AND predicate with no subpredicates evaluates to TRUE.

### Special Considerations

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

  [Predicate Programming Guide](https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/Predicates/AdditionalChapters/Introduction.html#//apple_ref/doc/uid/TP40001789)



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)