Reduce the SDK Size

Library size is depended on many aspects such as Bitcode, universal binaries, release mode optimization, app thinning, and compression This section discusses options to reduce SDK size.


Uqudo provides the SDK that it integrates quickly and with minimal coding required into your Android Apps. The Uqudo SDK ships with a real-time image processing, computer vision, and machine learning pipeline, as well as machine learning models.

Machine learning models tend to be large, but we have worked diligently to reduce the space required for the Uqudo SDK by App thinning, package size and binary size reduction. Rest assured that the SDK contains the bare necessities to do its job, and everything else resides on the far more resource-rich Server.

Also, Uqudo SDK is modular and might include third party dependencies that are not under our direct control.

App Thinning

iOS and Android have various ways of conveying a very similar concept. On both architectures, we define the concept of App Thinning as: "Creating and distributing your application so that your users only download the bytes they need over the wire, not bytes for an architecture that any given Userโ€™s phone does not support and does not use."

There are 3 primary architectures:

  • armv7 -- Old iPhones and Old Android devices.

  • arm64 -- All new iPhones and most new Android devices.

  • x86 -- iOS and Android Simulator and an extremely small and dying segment of real Android devices. (Note: Uqudo SDK doesnโ€™t support this architecture)

On Android, the concept is called "App Bundle". It is the upload format that includes all compiled code and resources but defers APK generation and signing to Google Play. Visit the android guide for more details.

Per the guide above, if you correctly apply App Bundles, your customers will download APKs that Google Play generates that ONLY contain the resources (at the specific resolution for that device) and binaries (specific libraries for that specific phoneโ€™s architecture).

App Configuration Options That You Control

If you canโ€™t add the SDK to your App because itโ€™s already too big, it might contain unused bloat such as:

  • A fat/universal IPA/APK -- You can reduce your size by ~50% if you do proper thinning/bundling.

  • Image resources -- Your app might have a too many high-quality images with a size of 10MB or more. Usually, these images are in unused flows in the App, or only used once, or are not properly thinned -- and thus are punishing all users in order to give high resolution images to a few. Please consider:

    • Apply App bundling

    • Dynamic resource download where possible instead of carrying around image data in your package.

    • Apply image optimization to get vast reduction in size with hardly noticeable changes to the actual image data itself.

Last updated