Prerequisites
- A signed production AAB or App Store archive
- The current native checksums and dependency lockfiles
- An inventory of host-owned previews, images, videos, and models
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 Android ARM targets required by your release policy. Use
arm64-v8a,armeabi-v7a, or both; App Bundles deliver only the matching ABI to each device.
Deliver effects on demand
Deliver effects through Cloud Filters and rely on SDK-managed 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.
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 |