Back to Docs
Recipe

Expo + Meridian Setup

Wire Meridian licensing into a fresh Expo SDK 52 project in under five minutes. Works with both managed and bare workflows.

Prerequisites

  • Node.js 20+ and npm 10+
  • Expo CLI installed globally
  • A Meridian product key from your dashboard
  • iOS Simulator or Android Emulator (optional)

Step 1 — Scaffold the project

npx create-expo-app@latest MyApp --template blank-typescript
cd MyApp

Step 2 — Install the Meridian SDK

npm install @getnimbus/expo-sdk

The SDK ships with TypeScript definitions and zero native dependencies — no prebuild required.

Step 3 — Initialize the client

Create a singleton in lib/meridian.ts:

import { MeridianClient } from '@getnimbus/expo-sdk'; export const meridian = new MeridianClient({ productKey: process.env.EXPO_PUBLIC_MERIDIAN_KEY!, appId: 'your-app-id', });

Step 4 — Guard your entry point

Wrap your root layout with the license gate:

import { meridian } from './lib/meridian'; import { LicenseGate } from '@getnimbus/expo-sdk'; export default function App() { return ( <LicenseGate client={meridian} fallback={<ExpiredScreen />}> <MainNavigator /> </LicenseGate> ); }

Step 5 — Run it

npx expo start

The gate performs an offline-first validation. If the key is valid, your app renders normally. Otherwise the fallback screen appears.

Next: Offline grace periods & cached validation — keep your users running even when the network drops.