<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AddressBook",
  "identifier" : "/documentation/AddressBook/ABSearchElement/matchesRecord(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Address Book"
    ],
    "preciseIdentifier" : "c:objc(cs)ABSearchElement(im)matchesRecord:"
  },
  "title" : "matchesRecord(_:)"
}
-->

# matchesRecord(_:)

Tests whether or not a record matches a search element.

```
func matchesRecord(_ record: ABRecord!) -> Bool
```

## Parameters

`record`

The record to be tested against the search object.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the `record` argument satisfies the conditions in the search element; otherwise, <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

If `record` is `nil`, this method raises an exception.

---

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)