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

# IOBluetoothOBEXSessionCreateWithIOBluetoothSDPServiceRecordRef

Create an OBEX session with a service ref, usually obtained from the device browser.

```
OBEXError IOBluetoothOBEXSessionCreateWithIOBluetoothSDPServiceRecordRef(IOBluetoothSDPServiceRecordRef inSDPServiceRef, OBEXSessionRef*outSessionRef);
```

## Parameters

`inSDPServiceRef`

A valid service reference.

`outSessionRef`

A valid ptr to an IOBluetoothOBEXSessionRef; will contain the newly created session if return value is kOBEXSuccess.

## Return Value

An error code value. 0 if successful.

## Discussion

You will use a session reference to do all OBEX interaction to a specific device. This method DOES NOT create a connection to the device of any kind.

*** DEPRECATED IN BLUETOOTH 2.2 (OS X 10.6) *** You should transition your code to Objective-C equivalents. *** This API may be removed any time in the future.

---

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)