tencent cloud

Tencent Real-Time Communication

Release Notes and Announcements
Release Notes
Recent Product Announcement
TRTC Live (TUILiveKit) Product Launch Announcement
TRTC Conference Official Editions Launched
The commercial version of Conference is coming soon
Terms and Conditions Applicable to $9.9 Starter Package
Rules for the "First Subscription $100 Discount" Promotion
Announcement on the Start of Beta Testing for Multi-person Audio and Video Conference
TRTC Call Official Editions Launched
License Required for Video Playback in New Version of LiteAV SDK
TRTC to Offer Monthly Packages
Product Introduction
Overview
Concepts
Features
Strengths
Use Cases
Performance Statistics
Tencent RTC Quickplay: Experience Ultimate Real-Time Audio and Video Interaction!
Purchase Guide
Billing Overview
Free Minutes
Monthly subscription
Pay-as-you-go
TRTC Overdue and Suspension Policy
FAQs
Refund Instructions
User Tutorial
Free Demo
Call
Overview
Activate the Service
Run Demo
Integration
Offline Call Push
Conversational Chat
On-Cloud Recording
AI Noise Reduction
UI Customization
Calls integration to Chat
Additional Features
No UI Integration
Server APIs
Client APIs
Solution
ErrorCode
Release Notes
FAQs
Conference
Overview(TUIRoomKit)
Activate the Service (TUIRoomKit)
Run Demo(TUIRoomKit)
Integration(TUIRoomKit)
Screen Sharing (TUIRoomKit)
Schedule a meeting (TUIRoomKit)
In-meeting Call (TUIRoomKit)
UI Customization(TUIRoomKit)
Virtual Background (TUIRoomKit)
Conference Control (TUIRoomKit)
Cloud Recording (TUIRoomKit)
AI Noise Reduction (TUIRoomKit)
In-Conference Chat (TUIRoomKit)
Robot Streaming (TUIRoomKit)
Enhanced Features (TUIRoomKit)
Client APIs (TUIRoomKit)
Server APIs (TUIRoomKit)
FAQs (TUIRoomKit)
Error Code (TUIRoomKit)
SDK Update Log (TUIRoomKit)
Live
Billing of Video Live Component
Overview
Activating the Service (TUILiveKit)
Run Demo
No UI Integration
UI Customization
Live Broadcast Monitoring
Video Live Streaming
Voice Chat Room
Advanced Features
Client APIs
Server APIs
Error Codes
Release Notes
FAQs
RTC Engine
Activate Service
SDK Download
API Examples
Usage Guidelines
API Reference Manual
Advanced Features
AI Integration
Overview
Configure MCP Server
Install Skills
Integration Guide
FAQ
RTC RESTFUL API
History
Introduction
API Category
Room Management APIs
Stream mixing and relay APIs
On-cloud recording APIs
Data Monitoring APIs
Pull stream Relay Related interface
Web Record APIs
AI Service APIs
Cloud Slicing APIs
Cloud Moderation APIs
Making API Requests
Call Quality Monitoring APIs
Usage Statistics APIs
Data Types
Appendix
Error Codes
Console Guide
Application Management
Package Management
Usage Statistics
Monitoring Dashboard
Development Assistance
Solution
Real-Time Chorus
FAQs
Migration Guide
Billing
Features
UserSig
Firewall Restrictions
How to Downsize Installation Package
Android and iOS
Web
Flutter
Electron
TRTCCalling for Web
Audio and Video Quality
Others
Legacy Documentation
RTC RoomEngine SDK(Old)
Integrating TUIRoom (Web)
Integrating TUIRoom (Android)
Integrating TUIRoom (iOS)
Integrating TUIRoom (Flutter)
Integrating TUIRoom (Electron)
TUIRoom APIs
On-Cloud Recording and Playback (Old)
RTC Analytics Monthly Packages (Previous Version)
Protocols and Policies
Compliance
Security White Paper
Notes on Information Security
Service Level Agreement
Apple Privacy Policy: PrivacyInfo.xcprivacy
TRTC Policy
Privacy Policy
Data Processing And Security Agreement
Glossary
DocumentationTencent Real-Time CommunicationFAQsHow to Downsize Installation Package

How to Downsize Installation Package

PDF
Focus Mode
Font Size
Last updated: 2023-10-13 11:21:36

How much will the file increment be after the TRTC SDK is integrated?

The file size increment varies by TRTC SDK version. For more information, please see SDK Download.


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

Method 1. Only package the ARM64 architecture (recommended)
Method 2. Enable Bitcode
For iPhone models after 5s, you can just package x64 architecture by setting "Build Active Architecture Only" in "Build Settings" in Xcode to "Yes" and write only arm64 into "Valid Architectures". The single-architecture IPA increment of the TRTC SDK will be 1.9 MB only.


For iPhone 5s and older models, if all third-party libraries in the project support Bitcode, you can enable Bitcode to reduce the size of the installation package. Toggle on "Enable Bitcode" in "Build Settings" > "Build Options" to enable bitcode.

From 2016 on, Apple started to support Bitcode compilation in the Xcode development environment. After Bitcode is enabled, the compiler will generate the application's intermediate code instead of the actual assembly code, and users will download and install the machine code generated for the specific mobile CPU architecture from App Store, which greatly reduces the installation package size.


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

Method 1. Only package certain .so files
Method 2. Only package JAR files (i.e., .so files will be downloaded after installation)
If your application is used in the Chinese mainland only, you can just package the .so files for the armeabi-v7a architecture to reduce the increment in the installation package size to below 5 MB. If you want to offer your application on Google Play, you can package the .so files for the armeabi-v7a and arm64-v8a architectures. Directions: add abiFilters "armeabi-v7a" to build.gradle of the current project to specify to package the .so files in a single architecture only or add abiFilters "armeabi-v7a","arm64-v8a" to specify to package .so files in two architectures.
If only .so files in armeabi-v7a architecture are packaged (i.e., your application is not offered on Google Play):


If .so files in armeabi-v7a and arm64-v8a architectures are packaged (i.e., your application is offered on Google Play):


notice
If you want to offer your application on Google Play, please do not use this method, as it may cause a failure in offering the application.
The size of .so files takes the greatest proportion of the total size of the SDK for Android. If you want to reduce your installation package to below 1 MB, you can use the method of downloading .so files after installation:
1. In the folder on GitHub, click and download the package named in the format of LiteAVSDK_TRTC_x.x.xxx.zip, decompress it, and find the .so files for the specified architecture.
2. Upload the .so files downloaded in step 1 to your server (or Tencent Cloud COS) and record the download address such as http://xxx.com/so_files.zip.
3. Before an SDK feature such as video playback is started by the user, use a loading animation to prompt the user that the relevant feature module is being loaded. When the user is waiting, the application can download the .so files from http://xxx.com/so_files.zip and store the files in the application directory (such as the files folder in the application's root directory). To ensure that this process is not affected by ISP DNS hijacking, please verify the integrity of the .so files after download to check whether the zip package has been tampered with the ISP.
4. After all .so files are ready, call the setLibraryPath() API in the TXLiveBase class (the earliest basic module of LiteAVSDK) to set the target paths of the downloaded .so files to the paths in the SDK, so that the SDK can load the required .so files at those paths and start the relevant features.


Help and Support

Was this page helpful?

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

Feedback