What is the SDK installation package increment?
The SDK installation package increment refers to the size of an app's installation package after integrating the SDK, minus the size of the installation package before integrating the SDK. The calculation method differs for different platforms.
- The SDK installation package increment data provided on the official website has some differences from the actual situation. The same SDK integrated into different apps will have different installation package increments. For example, the compression method and compression level of Android APK and Windows Installer can be customized.
- The data provided on the official website is calculated based on the default packaging method of new projects on each platform, trying to be as close as possible to the actual situation of most developers.
Android
- Use Android Studio to create a new Android App project and directly build and package a
.apkpackage in Release mode. The size of this.apkisP1. - Integrate the SDK into this App project, then build and package a
.apkpackage. The size of this.apkisP2.
- Generally, only one architecture of the SDK is integrated at a time (for example, arm64-v8a architecture). If you need to build a Universal APK containing multiple architectures, the SDK installation package size increment is the sum of the values of multiple architectures (for example, armeabi-v7a value + arm64-v8a value).
- Google recommends building multiple single-architecture apks of different architectures to reduce the app's package size. For details, please refer to Official Documentation.
- When the project's minSdkVersion >= 23, the packaged apk will be larger. It is recommended that you modify
android:extractNativeLibsoruseLegacyPackagingconfiguration to compress native dynamic libraries. For details, please refer to Official Documentation.
- Therefore, the SDK installation package increment for one architecture is
ΔP = P2 - P1.
iOS
- Use Xcode to create a new iOS App project and directly build and package a
.ipapackage in Release mode. The size of this.ipaisP1. - Integrate the SDK into this App project, then build and package a
.ipapackage. The size of this.ipaisP2.
Generally, only one architecture of the SDK is integrated at a time (for example, arm64 architecture). Since Apple has deprecated the armv7 architecture, all iOS apps released to the App Store are single-architecture arm64 apps.
- Therefore, the SDK installation package size increment for one architecture is
ΔP = P2 - P1.
macOS
- Use Xcode to create a new macOS App project and build and package a
.apppackage in Release mode. Then use a DMG image creation tool (such as the open-source create-dmg) to create a.dmgpackage (compressed in UDZO or zip format). The size of this.dmgisP1. - Integrate the SDK into this App project, then build and package a
.apppackage and create a.dmgpackage. The size of this.dmgisP2.
Generally, only one architecture of the SDK is integrated at a time (for example, x86_64 architecture). If you need to build a Universal package that supports both x86_64 and arm64 architectures, the SDK installation package size increment is the sum of the values of the two architectures. You can build single-architecture App packages for x86_64 and arm64 architectures separately and let users choose to download based on their machine type to reduce the app's package size.
- Therefore, the SDK installation package size increment for one architecture is
ΔP = P2 - P1.
Windows
-
Create a new Windows App project and build and package a product folder containing the app itself, executable binaries, and other resources. Then use a Windows Installer creation tool (such as Inno Setup) to create a
.exeinstallation package containing all app resources (compressed in zip/6 format). The size of this.exeisP1. -
In this App project, integrate the SDK, then build and package a product folder containing the app itself, executable binaries and SDK
.dlldynamic libraries, and other resources. Then create a.exeinstallation package containing all app resources. The size of this.exeisP2. -
Therefore, the SDK installation package size increment for one architecture is
ΔP = P2 - P1.
Linux
- Create a new Linux App project and build and package a product folder containing the app itself, executable binaries, and other resources. Then use an installation package creation tool (such as dpkg-deb) to create a
.debinstallation package containing all app resources (compressed in gzip format). The size of this.debisP1. - Integrate the SDK into this App project, then build and package a product folder containing the app itself, executable binaries and SDK
.sodynamic libraries, and other resources. Then create a.debinstallation package containing all app resources. The size of this.debisP2. - Therefore, the SDK installation package size increment for one architecture is
ΔP = P2 - P1.
