App size optimization

Updated

Reduce the size of apps that integrate Agora SDK

Reducing the game size is of great significance in improving user experience. A smaller package size means that users consume less bandwidth and time to download the game. Consider the following use-cases where app size optimization is critical:

  • There are strict requirements on the size of the game. For example, running the game on smart wearable devices with limited storage space.

  • The target user group of the game is located in underdeveloped areas. The poor network connectivity causes the game download time to be too long.

This page shows you how to optimize the size of games with integrated Video SDK.

Use the Voice SDK

Video SDK supports both audio and video functions, and the package size is large. If you only need to use audio features, best practice is to integrate the Voice SDK. For details, see Voice SDK Quickstart.

Remove unnecessary extensions

Video SDK provides optional extension dynamic libraries. The name of the extension is suffixed with extension. See the extension list for details on the function and size of the extensions. Refer to the following ways to exclude these extensions to reduce the size of the app.

Open the Assets/Agora-RTC-Plugin/Agora-Unity-RTC-SDK/Plugins folder in Unity Editor. It contains dynamic libraries for iOS, macOS, Windows, and Android. As shown below:

  • Android: If your target platform is Android, consider deleting the following files under the path Android/AgoraRtcEngineKit.plugin/libs:

    • arm64-v8a/<*>_extension.so
    • armeabi-v7a/<*>_extension.so
    • x86/<*>_extension.so
    • x86_64/<*>_extension.so

    Only delete these files if they are not required for your application to function correctly.

  • iOS: If your target platform is iOS, you can safely delete any unused <*>Extension.framework files located in the iOS folder of your project.

  • macOS: For macOS targets, you may delete any unused <*>Extension.framework files found in the macOS/AgoraRtcWrapperUnity.bundle/Contents/Frameworks path.

  • Windows: If targeting Windows, you have the option to delete <*>extension.dll or <*>extension.dll.lib files located in the x86 or x86_64 folder.

Exercise caution when deleting files, and always make sure that any removals do not impact the functionality of your application.

Delete files from the exported native project

When exporting a native project from Unity for a target platform, the dynamic library corresponding to that platform is copied to the native project. To remove unnecessary files, delete the dynamic libraries ending with extension directly from the exported native project.

Reference

This section contains content that completes the information in this page, or points you to documentation that explains other aspects to this product.

Extension list

Refer to the following information for an introduction to each Video SDK extension and the increase in the size of your app after integration.

The information in this section is based on version 4.4.0 of the Video SDK.