Skip to main content

Installation — React Native SDK

Prerequisites​

  • Node.js 18+
  • React Native >= 0.72, or Expo SDK 50+ with dev client
  • Xcode 14+ (iOS) / Android Studio (Android)

Step 1 — Install the package​

npm install @codematic/opencdp-react-native

Add the config plugin to app.json:

{
"expo": {
"plugins": ["@codematic/opencdp-react-native/app.plugin.js"]
}
}

Create a development build (Expo Go is not supported):

npx expo prebuild
npx expo run:ios
# or
npx expo run:android

Step 3 — Bare React Native​

cd ios && pod install && cd ..

Autolinking picks up the native android/ and ios/ modules from the package.

Step 4 — Native dependencies​

The package bundles:

  • Android: io.opencdp:opencdp-android
  • iOS: OpenCDP pod

No extra Maven or Pod entries are required beyond autolinking.

Verify it worked​

Import succeeds without errors:

import { OpenCDPSDK } from '@codematic/opencdp-react-native';

Next steps​