<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "IOBluetooth",
  "identifier" : "/documentation/IOBluetooth/OBEXAddConnectionIDHeader(_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "IOBluetooth"
    ],
    "preciseIdentifier" : "c:@F@OBEXAddConnectionIDHeader"
  },
  "title" : "OBEXAddConnectionIDHeader(_:_:_:)"
}
-->

# OBEXAddConnectionIDHeader(_:_:_:)

Add bytes representing a connection ID to a dictionary of OBEX headers.

```
func OBEXAddConnectionIDHeader(_ inHeaderData: UnsafeRawPointer!, _ inHeaderDataLength: UInt32, _ dictRef: CFMutableDictionary!) -> OBEXError
```

## Parameters

`inHeaderData`

Connection ID data. Should be 4 bytes in length only.

`inHeaderDataLength`

Length of Connection ID data. This should ONLY be set to equal 4.

`dictRef`

dictionary you have allocated to hold the headers. Make sure it’s mutable.

## Return Value

Error code, kOBEXSuccess (0) if success.

## Discussion

ConnectionID headers - OBEX Spec, 2.2.10: Byte Sequence

*** IMPORTANT NOTE: In bluetooth 1.0, using this function will allow you to pass in any value. You should not pass more than 4 bytes ever. In later releases, if the length passed is not 4, a kOBEXBadArgumentError error will be returned. ***

---

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)