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

# getStringValue()

If the data element is represented by a string object, it returns the value as an NSString.

```
func getStringValue() -> String!
```

## Return Value

Returns an NSString representation of the data element if it is a text or URL type.

## Discussion

The data types represented by a string object are 4 (text string) and 8 (URL).

---

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)