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

# Connections on React Native

> Present the hosted Connections page in a web auth session with expo-web-browser, for Expo or bare React Native.

<Note>
  This is an enterprise-only feature. Please [contact us](https://www.dynamic.xyz/book-a-call) to enable.
</Note>

On React Native the [Connections](/docs/connections/overview) contract is the same as the web and iOS, run in a web auth session. Works in Expo and bare React Native with Expo modules. The whole integration is one file, [`FireblocksConnect.ts`](https://github.com/dynamic-labs-oss/iframe-fb/blob/main/react-native/FireblocksConnect.ts).

<Tip>
  Use `expo-web-browser`'s `openAuthSessionAsync` — it's `ASWebAuthenticationSession` on iOS and Chrome Custom Tabs on Android, the same "open web, return via a callback scheme" primitive, run ephemerally (no consent prompt).
</Tip>

## 1. Install the modules

All three work in Expo and bare React Native.

```sh terminal theme={"system"}
npx expo install expo-web-browser expo-linking expo-crypto
```

## 2. Register your URL scheme

For Expo, set it in `app.json`. For bare React Native, add it to `Info.plist` (`CFBundleURLTypes`) and an Android intent-filter in `AndroidManifest.xml`.

```json app.json theme={"system"}
{ "expo": { "scheme": "myapp" } }
```

## 3. Connect and use the result

One call. The nonce is verified for you, and some wallets (Phantom) return out-of-band and are handled inside `connectWallet` via an `expo-linking` listener — so, unlike the raw iOS integration, you don't wire `onOpenURL` yourself.

```tsx ConnectButton.tsx theme={"system"}
import { connectWallet } from "./FireblocksConnect";

try {
  const wallet = await connectWallet({
    flowURL: "https://your-connect-page.example/",
    scheme: "myapp",
  });
  // wallet.address, wallet.chain,
  // wallet.walletName, wallet.walletImage
} catch (e) {
  // FireblocksConnectCancelled | FireblocksConnectError
}
```

`walletImage` is usually an SVG-sprite URL — render it in a `react-native-webview` `<img>` rather than `<Image>`.

## Common pitfalls

* **Test on a physical device.** Wallets don't run in the Simulator, so real wallet round-trips require a real device.
* **Serve over HTTPS.** The flow mints WalletConnect URIs via WebCrypto, which needs a secure context.
* **Phantom** has no WalletConnect option; the hosted page routes it to its in-app browser and this module catches the return. Validate on device.
