tencent cloud

Mobile Live Video Broadcasting

Release Notes and Announcements
TUILiveKit Release Notes
Live SDK Release Notes
User Guide
Product Introduction
Overview
Strengths
Performance Statistics
Concepts
Purchase Guide
TRTC Live Billing Overview
Billing of Video Live Component
Activating the Service (TUILiveKit)
Free Demo
Demo
Run Demo(TUILiveKit)
Integration Guide
Video Live Streaming
Preparation
Host Live Streaming
Audience Viewing
Live Stream List Live Stream List
Voice Chat Room
Preparation
Host Live Streaming
Audience Viewing
Live Stream List
Live Streaming Kit
Live Streaming Kit(Electron Desktop Application)
Live Streaming Kit(Web Desktop Browser)
Live Broadcast Monitoring
Monitoring Webpage (Web Desktop Browser React)
Monitoring Webpage (Web Desktop Browser Vue)
UI Customization
Live Stream Video Component
Video Source Editing Canvas
Audience List Component
Barrage Component
Media Source Configuration Panel
Link Management Panel
Live Gift Component
No UI Integration
Video Live Streaming
Voice Chat Room
Feature Guide
Follow Anchors (TUILiveKit)
Ultimate Image Quality (TUILiveKit)
Push Media Stream Into Room (TUILiveKit)
Gift System (TUILiveKit)
Client APIs
Android
iOS
Web
Server APIs (TUILiveKit)
Account System
REST API
Third-Party Webhooks
Error Codes (TUILiveKit)
FAQs
Platform Compilation
User Authentication
Live SDK
Product Introduction
Purchase Guide
Free Demo
Free Trial License
SDK Download
Licenses
Advanced Features
Client API
FAQs
Integration (No UI)
API Documentation
OSS information
OSS Attribution Notice

Downsizing Installation Package

Focus Mode
Font Size
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.


Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback