tencent cloud

All product documents
Mobile Live Video Broadcasting
Downsizing Installation Package
Last updated: 2024-01-13 15:49:41
Downsizing Installation Package
Last updated: 2024-01-13 15:49:41

How do I reduce the size of an installation package for iOS?

Packaging arm64 only (recommended)

You can package only arm64 into applications for iPhone 5S and later. In Xcode, set Build Active Architecture Only to Yes and enter arm64 only for Valid Architectures. A single-architecture TRTC SDK adds only 1.9 MB to an IPA file.



How do I reduce the size of an installation package for Android?

1. Packaging only 1 or 2 SO files

If your application is intended for the Chinese mainland, you can package only the SO file for armeabi-v7a, in which case the SDK will add 5 MB or less to your installation package. If you want to publish your application on Google Play, then you can package the SO files for armeabi-v7a and arm64-v8a.
Specifically, you need to add abiFilters "armeabi-v7a" in build.gradle of your project to package only the armeabi-v7a SO file, and abiFilters "armeabi-v7a", "arm64-v8a" to package the armeabi-v7a and arm64-v8a SO files.
If you do not intend to publish your application on Google Play:

If you want to publish your application on Google Play:


2. Downloading SO files after installation (packaging JAR only)

SO files take up most of the size of the MLVB SDK for Android. Therefore, if you want the SDK to add 1 MB or less to your installation package, you can have SO files downloaded to users’ phones after installation.
Step 1. Download the SO files Download LiteAVSDK_x.x.xxx.zip at GitHub, decompress the file, and find the SO files for the architecture you use. Find the SO files for the architectures you want to use.
Step 2. Upload the SO files to your server Upload the SO files downloaded in Step 1 to your server (or to Tencent Cloud COS) and note the download URL, such as http://xxx.com/so_files.zip.
Step 3. Download the SO files at the SDK’s first launch Before users use the SDK’s features, for example, to play video, show a loading animation on the UI and tell users that modules are being loaded.
While users wait, your application can download the SO files from http://xxx.com/so_files.zip and save them in the files folder of your application’s root directory. Given the possibility of DNS hijacking and file tampering by the carrier, please check the integrity of the SO files after download.
Step 4. Use an API to load the SO files After the SO files are in place, call the setLibraryPath() API in the TXLiveBase class (the earliest underlying module of LiteAVSDK), setting the SDK’s library paths to the target paths of the downloaded SO files. The SDK will load the SO files from the paths and enable related features.
Note:
Do not use this method if you want to publish your application on Google Play.

Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon