---
title: getMaxPacketLength()
framework: IOBluetooth
role: symbol
role_heading: Instance Method
path: iobluetooth/obexsession/getmaxpacketlength()
---

# getMaxPacketLength()

Gets current max packet length.

## Declaration

```swift
func getMaxPacketLength() -> OBEXMaxPacketLength
```

## Return Value

Return Value Max packet length.

## Discussion

Discussion This value could change before and after a connect command has been sent or a connect command response has been received, since the recipient could negotiate a lower max packet size.
