---
title: "withOBEXSession(_:)"
framework: IOBluetooth
role: symbol
role_heading: Type Method
path: "iobluetooth/obexfiletransferservices/withobexsession(_:)"
---

# withOBEXSession(_:)

Create a new OBEXFileTransferServices object

## Declaration

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

## Parameters

- `inOBEXSession`: A valid IOBluetoothOBEXSession

## Return Value

Return Value A newly created OBEXFileTransferServices object on success, nil on failure

## Discussion

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.
