---
title: "reportTransition(to:stableMetadata:volatileMetadata:)"
framework: statereporting
role: symbol
role_heading: Instance Method
path: "statereporting/statereporter/reporttransition(to:stablemetadata:volatilemetadata:)"
---

# reportTransition(to:stableMetadata:volatileMetadata:)

Reports a transition to a new state.

## Declaration

```swift
final func reportTransition(to stateLabel: String?, stableMetadata: StableMetadata? = nil, volatileMetadata: VolatileMetadata? = nil)
```

## Parameters

- `stateLabel`: A descriptive label for the new state, which must not be empty, or nil to clear the active state.
- `stableMetadata`: An optional value that identifies the state together with stateLabel.
- `volatileMetadata`: An optional value providing context likely to change within this state.

## Mentioned in

Getting started with StateReporting

## Discussion

Discussion A transition occurs only when stateLabel or stableMetadata changes from the current state. If both are equal to the current values, this call is a no-op. Pass nil for stateLabel to indicate that no state is currently active, clearing any previously reported state. Passing an empty string for stateLabel is a fatal error. Any volatile metadata from the previous state is discarded when a new transition begins. Calling this method more frequently than user interaction timescales can trigger rate limiting, causing state updates to go unlogged.
