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

Install for Flutter

Add nosmai_effects_sdk 1.0.2 to Flutter and configure its native iOS and Android dependencies on a physical ARM64 device.

Platform Flutter SDK version 1.0.2 Updated Aug 22, 2026 Time 12 min

Prerequisites

  • Flutter 3.22 or later
  • Dart 3 or later
  • iOS 15 or Android API 21 as the minimum application target
  • A physical arm64 iOS or arm64-v8a Android device
  • A Nosmai licence key for each native app identity

Add the Dart package

flutter pub add nosmai_effects_sdk:^1.0.2
flutter pub add permission_handler

The public Dart package contains the Flutter API and native bridges. It does not contain proprietary native SDK binaries or licensed .nosmai assets.

Add the Android native SDK

Download nosmai-sdk-3.0.4.aar and SHA256SUMS from the official Android release. Verify the checksum, then copy the AAR to this exact path and name:

android/app/libs/nosmai-release.aar

Add the app-owned runtime dependency in android/app/build.gradle:

android {
  compileSdkVersion 35

  defaultConfig {
    minSdkVersion 21
    ndk {
      abiFilters 'arm64-v8a'
    }
  }

  compileOptions {
    sourceCompatibility JavaVersion.VERSION_11
    targetCompatibility JavaVersion.VERSION_11
  }
}

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

The Flutter plugin uses compileOnly for this dependency so the native binary is not duplicated in the pub.dev archive. Keep exactly one app-level AAR.

Add permissions to android/app/src/main/AndroidManifest.xml:

<manifest xmlns:android="http://schemas.android.com/apk/res/android">
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.RECORD_AUDIO" />

    <application
        android:label="camera_app"
        android:name="${applicationName}"
        android:icon="@mipmap/ic_launcher" />
</manifest>

Configure iOS

Set the minimum deployment target in ios/Podfile:

platform :ios, '15.0'

The Flutter pod depends on NosmaiCameraSDK ~> 3.0.4. Do not add a manual framework copy when using CocoaPods.

Add permission descriptions to ios/Runner/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
pod install --repo-update
cd ..

The iOS framework has no simulator slice. Run the camera integration on a physical arm64 iPhone or iPad.

Native size impact

The Android AAR is about 51.4 MiB before App Bundle optimization. The verified iOS framework release ZIP is about 22.9 MiB compressed. The Dart wrapper is small relative to the native binaries. Measure signed release builds because store compression, app thinning, selected assets, and existing dependencies change the final download increase.

Verify it worked

Run static analysis:

flutter analyze

Then build for one physical target:

flutter build apk --debug

or:

flutter build ios --no-codesign

A successful native build confirms package linking. Continue to the Flutter quickstart to request permission, initialize Nosmai, and render a visible effect.

Common errors

ErrorCauseFix
Could not find :nosmai-release:Android AAR is missing or named differentlyPut the verified artifact at android/app/libs/nosmai-release.aar
Duplicate class com.nosmaiMore than one native AAR is linkedRemove duplicate copies and keep the app-level runtime dependency only
INSTALL_FAILED_NO_MATCHING_ABISAndroid device lacks arm64-v8aRun on a physical ARM64 Android device
building for iOS Simulator, but linking in object file built for iOSFlutter selected an iOS SimulatorSelect a physical iOS device
CocoaPods not installed or not in valid stateiOS native dependencies were not resolvedInstall CocoaPods, run pod install --repo-update, and retry

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