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

# containsValue(_:)

Checks to see if the target data element’s value is the same as the value parameter or if it contains the value parameter.

```
func containsValue(_ cmpValue: NSObject!) -> Bool
```

## Parameters

`cmpValue`

The value to compare with (and search for).

## Return Value

Returns TRUE if the target’s value either matches the given value or if it contains the given value.

## Discussion

This method works just like -containsDataElement: except that it is comparing the value objects directly.

---

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)