<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.6.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Security",
  "identifier" : "/documentation/Security/kSecMatchItemList",
  "metadataVersion" : "0.1.0",
  "role" : "Global Variable",
  "symbol" : {
    "kind" : "Global Variable",
    "modules" : [
      "Security"
    ],
    "preciseIdentifier" : "c:@kSecMatchItemList"
  },
  "title" : "kSecMatchItemList"
}
-->

# kSecMatchItemList

A key whose value indicates a list of items to search.

```
let kSecMatchItemList: CFString
```

## Discussion

To provide your own set of items to be filtered by a search query rather than searching the keychain, specify this search key in a call to the [`SecItemCopyMatching(_:_:)`](/documentation/Security/SecItemCopyMatching(_:_:)) function with a value that consists of an object of type <doc://com.apple.documentation/documentation/CoreFoundation/CFArray> where the array contains either [`SecKeychainItem`](/documentation/Security/SecKeychainItem), [`SecKey`](/documentation/Security/SecKey), [`SecCertificate`](/documentation/Security/SecCertificate), [`SecIdentity`](/documentation/Security/SecIdentity), or <doc://com.apple.documentation/documentation/CoreFoundation/CFData> items. The objects in the provided array must all be of the same type.

To convert from persistent item references to normal item references, specify this search key in a call to the [`SecItemCopyMatching(_:_:)`](/documentation/Security/SecItemCopyMatching(_:_:)) function with a value of type <doc://com.apple.documentation/documentation/CoreFoundation/CFArray> where the array contains one or more <doc://com.apple.documentation/documentation/CoreFoundation/CFData> elements (the persistent references), and a return-type key of [`kSecReturnRef`](/documentation/Security/kSecReturnRef) whose value is <doc://com.apple.documentation/documentation/CoreFoundation/kCFBooleanTrue>.

To delete an item identified by a transient reference, specify the [`kSecMatchItemList`](/documentation/Security/kSecMatchItemList) search key in a call to the [`SecItemDelete(_:)`](/documentation/Security/SecItemDelete(_:)) function with a reference returned by using the [`kSecReturnRef`](/documentation/Security/kSecReturnRef) return type key in a previous call to the [`SecItemCopyMatching(_:_:)`](/documentation/Security/SecItemCopyMatching(_:_:)) or [`SecItemAdd(_:_:)`](/documentation/Security/SecItemAdd(_:_:)) functions.

To delete an item identified by a persistent reference, specify the [`kSecMatchItemList`](/documentation/Security/kSecMatchItemList) search key in a call to the [`SecItemDelete(_:)`](/documentation/Security/SecItemDelete(_:)) function with a persistent reference returned by using the [`kSecReturnPersistentRef`](/documentation/Security/kSecReturnPersistentRef) return type key to the [`SecItemCopyMatching(_:_:)`](/documentation/Security/SecItemCopyMatching(_:_:)) or [`SecItemAdd(_:_:)`](/documentation/Security/SecItemAdd(_:_:)) functions.

---

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)