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

# withOBEXSession(_:)

Create a new OBEXFileTransferServices object

```
class func withOBEXSession(_ inOBEXSession: IOBluetoothOBEXSession!) -> Self!
```

## Parameters

`inOBEXSession`

A valid IOBluetoothOBEXSession

## Return Value

A newly created OBEXFileTransferServices object on success, nil on failure

## Discussion

This object must be constructed with a valid IOBluetoothOBEXSession. The given IOBluetoothOBEXSession does not need to be connected to the remote server. This module can be manually connected through the connect() method.

---

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)