@amazon-devices/ system distributed libraries and resubmit to the Amazon Appstore, the devices that still contain older versions of these libraries won’t be able to install or update to your latest app version.
About system distributed libraries
System distributed libraries are JavaScript packages, always prefixed with@amazon-devices/, that are pre-installed on the device to optimize app size and loading time.
As it relates to backward compatibility, the version of each of these libraries is static until the device receives a new flash or OTA update.
When a new version of a system distributed library is released (for example, 2.1.0), React Native for Vega maintains compatibility with previous versions (like 2.0.0) within the same major version.
Use the compatibility library
Install compatibility library
Run the following command to install the library:min and target in the [os.version] section of your manifest.toml. For details, see Target OS Versions and Manifest [os.version] Section.
Add version checks in code
TheisPresentOnOS API helps you verify at runtime whether the required library version is installed on the system, which is especially important when your code depends on specific older versions or needs features that are only available in newer versions.
Testing and verification
Before submitting your app, it’s important to thoroughly test on devices with both older and newer versions of the system distributed libraries that your app uses. Steps to Test- Use Vega to install different simulators: use the CLI to install device simulators on older and newer versions, which will help simulate different real-world scenarios of pre-installed system distributed libraries.
- Install the app.
- Verify that the app works as expected, paying special attention to any version checks and fallback implementations for older versions, to ensure they are functioning correctly.
Example
Add support for a new feature
The example below shows you how to add support for an imaginedwithNewBehaviors attribute in DragGesture of @amazon-devices/react-native-gesture-handler. This allows you to switch from the legacy PanGesture implementation, but keep the previous implementation to maintain backward compatibility older library versions.
Troubleshooting
Common issues
A list of common problems and their solutions can be found below.Version mismatch
- Problem - The app fails to install on some devices.
- Solution - Verify that your
[os.version].minvalue inmanifest.tomlisn’t higher than the OS version on your target devices. For details, see Manifest [os.version] Section.
Runtime errors
- Problem - Features crash on certain devices.
- Solution - Ensure you wrap all new feature usage in version checks.
Testing issues
- Problem - It’s difficult to test across versions.
- Solution - Use the device simulator to test with different system versions.
Performance best practices with version check
- Always check versions as early as possible in your component lifecycle.
- Cache version check results to avoid repeated checks.
-
Consider creating utility functions for commonly checked feature sets, as shown in this example below.

