> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rampkit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Bridge communication

> Communicating between app and RampKit on iOS

## Bridge communication

Exchange data between your app and RampKit to power dynamic experiences.

* Send context in real time via `setUserAttributes`
* Read variables to adapt UI around the flow
* Subscribe to events to react to user actions

```swift theme={null}
RampKit.setUserAttributes(["balance": 25.0, "currency": "USD"])

let title = RampKit.variable("paywallTitle") ?? "Go Pro"

RampKit.onEvent { event in
  if event.type == .flowCompleted {
    // Unlock feature
    FeatureFlags.shared.set("pro", enabled: true)
  }
}
```
