Nosmai  Effects Nosmai  Moderation Nosmai Try-ons coming soon
Docs menu React Native
How-to guide

Install for React Native

Install the stable Nosmai Effects SDK for React Native in a New Architecture project and configure its native dependencies for physical ARM64 devices.

Platform React Native SDK version 1.0.0 Updated Aug 22, 2026 Time 15 min

Prerequisites

  • React Native 0.81.5 with React 19.1.x, or Expo SDK 54
  • New Architecture enabled
  • Node 20.19.4 or later
  • A physical arm64 iOS or arm64-v8a Android device
  • Android API 24 or later for the React Native host
  • iOS 15 or later
  • A Nosmai licence key for each native identity
  • The verified Android AAR and iOS CocoaPod used by the package

The React Native package is public on npm under the latest tag. Expo Go cannot load its TurboModule or Fabric component, so Expo projects require a custom development or release build.

Add the package

Install the current stable release from npm:

yarn add @nosmai/react-native-effects-sdk

Use the exact version when the application must stay on this qualified release:

yarn add @nosmai/[email protected]

Commit the resulting lockfile. Do not depend on an unpinned moving Git branch in a production application.

Configure a bare React Native Android app

Download and verify the Android 3.0.4 AAR. Put exactly one copy here:

Download the verified Android v3.0.4 release.

android/app/libs/nosmai-release.aar

Configure the app module:

android {
  defaultConfig {
    minSdkVersion 24
    ndk {
      abiFilters 'arm64-v8a'
    }
  }
}

dependencies {
  implementation files('libs/nosmai-release.aar')
}

Keep New Architecture enabled in android/gradle.properties:

newArchEnabled=true

The library manifest declares camera, internet, recording audio, and the legacy write permission limited to API 28. The host app still requests camera and microphone permission at runtime.

Configure a bare React Native iOS app

The package pod depends on NosmaiCameraSDK ~> 3.0.4 and resolves the verified native SDK 3.0.4 framework. It does not vendor a framework.

Add these keys to the host application's Info.plist:

<key>NSCameraUsageDescription</key>
<string>This app uses the camera for real-time filters and effects.</string>
<key>NSMicrophoneUsageDescription</key>
<string>This app uses the microphone when recording video.</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>This app saves captured photos and videos to your library.</string>

Install pods:

cd ios
bundle exec pod install
cd ..

The iOS framework is device-only. Select a physical arm64 iPhone for runtime verification.

Configure Expo SDK 54

Keep the proprietary Android AAR outside the generated android directory, for example at vendor/nosmai-release.aar. Add the config plugin:

export default {
  expo: {
    newArchEnabled: true,
    plugins: [
      [
        '@nosmai/react-native-effects-sdk',
        {
          androidAarPath: './vendor/nosmai-release.aar',
          androidAarSha256: process.env.NOSMAI_ANDROID_AAR_SHA256,
          cameraPermission:
            'Allow this app to use the camera for Nosmai effects.',
          microphonePermission:
            'Allow this app to use the microphone when recording video.',
          photoLibraryAddPermission:
            'Allow this app to save captured photos and videos.',
        },
      ],
    ],
  },
};

Create a custom development build:

npx expo install expo-dev-client
npx expo prebuild --clean
npx expo run:android

For iOS, use a physical device:

npx expo run:ios --device

expo prebuild --clean recreates native directories. Keep the source AAR in a stable vendor location and preserve unrelated manual native changes before running it.

Package size

The 1.0.0 npm package is about 226.1 kB packed and 1.1 MB unpacked. It contains JavaScript, TypeScript declarations, the Fabric view, native bridges, and an Expo config plugin. It excludes the proprietary Android AAR and iOS framework. Native size impact therefore follows the Android and iOS artifacts rather than the JavaScript archive alone.

Verify it worked

Run the package and TypeScript checks in the host app, then build a native target:

yarn typecheck
yarn android

or build iOS from the workspace for a physical device. Confirm that importing both symbols compiles:

import {
  NosmaiCameraSdk,
  NosmaiCameraView,
} from '@nosmai/react-native-effects-sdk';

Continue to the React Native quickstart to request permission, mount the Fabric view, initialize, and start processing.

Common errors

ErrorCauseFix
Cannot find native module 'NosmaiCameraSdk'App is running in Expo Go or native code was not rebuiltUse an Expo development build or rebuild the bare native application
E_NOT_INITIALIZEDA camera or effect method ran before initializationAwait NosmaiCameraSdk.initialize before starting processing
E_NO_PREVIEWThe Fabric view was not mounted before processing startedMount NosmaiCameraView, wait for layout, then call startProcessing
E_CAMERA_PERMISSIONAndroid host did not grant runtime camera accessRequest PermissionsAndroid.PERMISSIONS.CAMERA before startup
INSTALL_FAILED_NO_MATCHING_ABISAndroid target lacks arm64-v8aUse a physical ARM64 device and keep the ABI filter
building for iOS Simulator, but linking in object file built for iOSSimulator was selectedRun the native build on a physical iPhone

Next steps

References

Was this page helpful?

Your response helps us prioritize documentation improvements.

Nosmai

An AR and AI company. Founded on the idea that the next decade of software will be visual, and that the tools for it should be within reach of anyone building.

Newsletter

Product updates and release notes. No spam.

© 2026 nosmai, inc · all rights reserved