The file size increment varies by TRTC SDK version. For more information, please see SDK Download.
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.
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
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.
armeabi-v7aarchitecture are packaged (i.e., your application is not offered on Google Play):
arm64-v8aarchitectures are packaged (i.e., your application is offered on Google Play):
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:
LiteAVSDK_TRTC_x.x.xxx.zip, decompress it, and find the .so files for the specified architecture.
http://xxx.com/so_files.zipand store the files in the application directory (such as the
filesfolder 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.
setLibraryPath()API in the
TXLiveBaseclass (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.