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
- Compare signed store-delivery size with the baseline.
- Install on a clean physical device.
- Open the first camera experience without downloading optional content.
- Download, apply, reuse, remove, and redownload a Cloud Filter.
- Test offline behavior for already cached and evicted content.
Common errors
| Symptom | Cause | Fix |
|---|---|---|
| Size did not fall after deleting an AAR | Another wrapper or build cache still packages the binary | Inspect the final archive and dependency graph, then clean and rebuild |
| Cloud Filter works once but later path is missing | The OS reclaimed cache storage | Store the identifier and download again through the SDK |
| iOS reports duplicate symbols | Pod and manual framework are both embedded | Choose one iOS distribution path |