Effects Flutter
Effects / Get started / Installation / Flutter

Install the Nosmai Effects SDK for Flutter

Updated August 28, 2026

Add nosmai_effects_sdk 1.0.3 to Flutter and configure its native dependencies for physical iOS devices and supported 32-bit or 64-bit ARM Android devices.

Prerequisites

  • Flutter 3.29 or later
  • Dart 3 or later
  • iOS 15 or Android API 24 as the minimum application target
  • A physical arm64 iOS device, or an Android device that supports arm64-v8a or armeabi-v7a
  • A Nosmai licence key for each native app identity

Requirement details

The Dart package provides the Flutter-facing commands and preview widget. The native dependencies are the underlying Android and iOS libraries that perform the platform camera work. Both layers are required. The iOS framework targets physical arm64 devices. Android SDK 3.0.7 includes both arm64-v8a (64-bit ARM) and armeabi-v7a (32-bit ARM); x86 and x86_64 emulators are not supported.

Add the Dart package

flutter pub add nosmai_effects_sdk:^2.0.2
flutter pub add permission_handler

The public Dart package contains the Flutter API and native bridges. Version 2.0.2 resolves the verified Android 3.0.7 AAR from the official Nosmai GitHub release and resolves NosmaiCameraSDK 3.0.7 through CocoaPods on iOS. Licensed effect packages are delivered separately.

Resolve the Android native SDK automatically

The Flutter 2.0.2 plugin already declares the Android 3.0.7 dependency and registers the official release repository. Do not copy an AAR into android/app/libs and do not add a second app-level Nosmai dependency.

If you are upgrading from an older manual setup, remove the copied Nosmai AAR from android/app/libs and remove its implementation(files(...)) or implementation fileTree(...) entry when that entry was added only for Nosmai. The plugin must remain the only source of the native Android SDK.

Configure the Android application requirements in android/app/build.gradle:

android {
  compileSdkVersion 35

  defaultConfig {
    minSdkVersion 24
    ndk {
      abiFilters 'arm64-v8a', 'armeabi-v7a'
    }
  }

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

Gradle downloads nosmai-sdk-3.0.7.aar from the official Android v3.0.7 release during dependency resolution. The build machine therefore needs network access to GitHub Releases when the dependency is not already cached.

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 declares the exact NosmaiCameraSDK 3.0.7 dependency. 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 3.0.7 AAR is 40,433,979 bytes (38.6 MiB) before App Bundle optimization and contains both supported ARM ABIs. The iOS 3.0.7 framework archive contains 42,614,663 bytes (40.6 MiB) uncompressed, and its verified release ZIP is 27,200,994 bytes (25.9 MiB). 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 com.nosmai:nosmai-sdk:3.0.7Gradle could not reach the official release repository and the AAR was not cachedConfirm network access to GitHub Releases, then refresh Gradle dependencies
Duplicate class com.nosmaiMore than one native AAR is linkedRemove manual AAR copies and keep only the dependency declared by the Flutter plugin
INSTALL_FAILED_NO_MATCHING_ABISAndroid device or build includes neither arm64-v8a nor armeabi-v7aRun on a supported physical ARM Android device and retain at least one supported ABI
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

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