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

# Migrate to React Native SDK 2.0

> Upgrade your Expo app to Expo SDK 58 and version 2.0 of the Crossmint React Native SDK

Version 2.0 of `@crossmint/client-sdk-react-native-ui` works only with Expo SDK 58. Your app code does not change. The upgrade changes your dependencies and your native project.

> [!NOTE]
>
> Version 1.x supports Expo SDK 54. If your app stays on Expo SDK 54, you can stay on version 1.x. On Expo SDK 57, version 1.x does not build for iOS.

## What Changed

* **Expo SDK 58 only.** The SDK supports one Expo SDK per release. Version 2.0 needs Expo SDK 58 (React Native 0.88, iOS 16.4 or later).
* **Native modules are peer dependencies.** Your app installs `expo-constants`, `expo-device`, `expo-secure-store`, `expo-web-browser`, `react-native-get-random-values`, `react-native-svg` and `react-native-webview`, in the versions that match its Expo SDK.
* **Xcode 27 support.** Apps built with Xcode 27 must use the UIKit scene lifecycle, where a scene delegate manages the app window. Expo SDK 58 generates it for you.

## Prerequisites

* **Expo app**: An app that uses `@crossmint/client-sdk-react-native-ui` 1.x.
* **Development build**: Expo Go cannot run the SDK's native modules. Use a development build.

## Upgrade Your App

**1. Upgrade Expo to SDK 58**

Upgrade `expo` to SDK 58:

```bash theme={null}
npx expo install expo@^58.0.0 --fix
```

The `--fix` flag also updates the other Expo packages in your `package.json` to their SDK 58 versions. It does not update the Crossmint SDK. The next step does that.

For changes in Expo itself, read the [Expo SDK 58 changelog](https://expo.dev/changelog/sdk-58).

**2. Upgrade the Crossmint SDK and install its peers**

Remove version 1.x first. If version 1.x stays installed, npm stops the next command with a peer dependency conflict.

```bash theme={null}
npm uninstall @crossmint/client-sdk-react-native-ui
```

With yarn, pnpm or bun, use its `remove` command.

Then install version 2.0 and its peers. The SDK needs all of these packages, because they are required peer dependencies. Use `npx expo install`, which picks the versions that match your Expo SDK.

```bash theme={null}
npx expo install @crossmint/client-sdk-react-native-ui@^2.0.0 expo-constants expo-device expo-secure-store expo-web-browser react-native-get-random-values react-native-svg react-native-webview
```

If your app already lists some of these packages, the command updates them to the Expo SDK 58 versions.

Then run Expo Doctor. It finds versions that do not match Expo SDK 58, and duplicate native modules:

```bash theme={null}
npx expo-doctor
```

Fix every issue it reports before you continue.

**3. Regenerate the native project**

Expo SDK 58 adds the UIKit scene lifecycle to the iOS project: a `SceneDelegate.swift` file and a scene manifest in `Info.plist`. The Crossmint config plugin works with it.

**Generated native folders**

If Expo generates your `ios/` and `android/` folders (continuous native generation), regenerate them:

```bash theme={null}
npx expo prebuild --clean
```

**Hand-maintained native folders**

Do not run `prebuild --clean`. It deletes your changes to `ios/` and `android/`.

Add the scene lifecycle to your own `AppDelegate` and `Info.plist`. Follow the [Expo iOS scene lifecycle guide](https://expo.fyi/ios-scene-lifecycle).

**4. Build and test the app**

Build and start the app on both platforms:

```bash theme={null}
npx expo run:ios
```

```bash theme={null}
npx expo run:android
```

Sign in on each platform. The upgrade works if the app shows the user's wallet.

## Troubleshooting

> **The iOS app stops at launch with "UIScene life cycle is required"**
>
> The iOS project does not have the scene lifecycle. Xcode 27 needs it. Make sure `expo` is on SDK 58, then do the **Regenerate the native project** step again.

> **Expo Doctor reports duplicate native modules**
>
> Your app has more than one version of a native module, for example `react-native-svg`. A version 1.x copy of the Crossmint SDK can cause this. Make sure your app uses `@crossmint/client-sdk-react-native-ui` 2.0 or later. Then run the install command from the **Upgrade the Crossmint SDK and install its peers** step again.

> **The package manager reports a peer dependency conflict**
>
> If the error names `@crossmint/client-sdk-react-native-ui@1.x` and a conflicting peer such as `react-native-svg`, version 1.x is still installed. Uninstall it, then run the install command again. Both commands are in the **Upgrade the Crossmint SDK and install its peers** step.
>
> In other cases, a peer does not match the Expo SDK 58 version. Install it with `npx expo install <package>`. Do not use `npm install` for these packages. It picks the latest version, which can belong to a different Expo SDK.

## Next Steps

> **[React Native Quickstart](/wallets/quickstarts/react-native)**
>
> Create user wallets from your Expo app

> **[React Native SDK Reference](/sdk-reference/wallets/react-native/get-started)**
>
> See the providers, hooks and components
