Nosmai  Effects Nosmai  Moderation Nosmai Try-ons coming soon
Docs menu Reduce app size
How-to guide

Reduce application size

Measure the signed release, keep one native binary, and move optional authored packages out of the initial mobile download.

SDK version Native 3.0.4 · Flutter 1.0.2 · React Native 1.0.0 Updated Aug 22, 2026 Time 6 min

Prerequisites

  • A signed production AAB or App Store archive
  • The current native checksums and dependency lockfiles
  • An inventory of bundled .nosmai, preview, image, video, and model assets

Measure the delivered application

Do not use the AAR, framework ZIP, Flutter archive, or npm tarball as the final store-size estimate. Measure Play Console device delivery and App Store archive thinning for the signed application. Record baseline download and installed size before changing dependencies.

Keep one native SDK

  • Replace old AARs instead of accumulating versioned filenames in app/libs.
  • Use either CocoaPods or manual framework embedding on iOS, never both.
  • Inspect Flutter and React Native host projects for an extra manually linked native binary.
  • Keep only the supported ARM64 target required by the release policy.

Move optional effects on demand

Bundle only the packages required for the first experience. Deliver optional effects through Cloud Filters and rely on SDK-managed local storage after a verified download. The operating system can reclaim cache storage, so retain the cloud identifier and support redownload rather than assuming the path is permanent.

Compress and resize host-owned preview images, videos, and thumbnails according to their actual display size. Do not modify protected .nosmai package contents.

Verify the optimized build

  1. Compare signed store-delivery size with the baseline.
  2. Install on a clean physical device.
  3. Open the first camera experience without downloading optional content.
  4. Download, apply, reuse, remove, and redownload a Cloud Filter.
  5. Test offline behavior for already cached and evicted content.

Common errors

SymptomCauseFix
Size did not fall after deleting an AARAnother wrapper or build cache still packages the binaryInspect the final archive and dependency graph, then clean and rebuild
Cloud Filter works once but later path is missingThe OS reclaimed cache storageStore the identifier and download again through the SDK
iOS reports duplicate symbolsPod and manual framework are both embeddedChoose one iOS distribution path

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