---
title: invalidate()
framework: Accessory Transport Extension
role: symbol
role_heading: Instance Method
platforms: [iOS 27.3+]
path: accessorytransportextension/accessoryfeatureruntimesession/invalidate()
---

# invalidate()

Unregisters the session.

## Declaration

```swift
func invalidate()
```

## Discussion

Discussion Call this method when your app’s exchange with the data provider extension is complete but before releasing an active session. The system throws an error if your app releases an active session without invalidating it.

## See Also

### Managing the session life cycle

- [activate()](accessorytransportextension/accessoryfeatureruntimesession/activate().md)
