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

# OBEXAddByteSequenceHeader(_:_:_:)

Add a byte sequence header to a dictionary of OBEXheaders.

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

## Parameters

`inHeaderData`

bytes you want to put in the byte sequence header.

`inHeaderDataLength`

length of the bytes you want to put in the byte sequence header.

`dictRef`

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

## Return Value

Error code, kOBEXSuccess (0) if success.

## Discussion

Byte Sequence header - OBEX Spec, 2.2.5: Byte sequence. One thing of important note here - since we don’t know what Header Identifier and length you intend to use here, you MUST include your own identifier and length in the data you pass. Thus, your data must be in this format: <1:HI><2:LENGTH><n:()> Also, note that LENGTH = (3 + n), (1 for HI, 2 for the 2 bytes of length information, plus your n bytes of custom data). Be careful here to not mess up these values, as it could adversely affect the ability of the remote-device’s headers parser.

---

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)