To get started, install the package using your preferred package manager:
![]() |
![]() |
![]() |
![]() |
---|---|---|---|
Android | iOS | AndroidTV | tvOS |
The setup process varies depending on whether you are using Expo or a bare React Native project. Follow the steps below based on your project type.
If you are using Expo, you need to add the config plugin to your app.json
or app.config.js
file:
After adding the plugin, rebuild your app using either:
or
This will ensure the required native dependencies are included.
This library cannot be used in Expo Go because it requires custom native code.
For bare React Native projects, you need to run the CLI plugin to generate and include license data. Run the following command from your project root:
This will extract and prepare license metadata for use in your app.
Once the setup is complete, you can easily add a button to your app to display the list of open-source licenses:
This will open a native screen listing all detected licenses. The title of the screen can be customized by passing a different string argument to launchLicenseListScreen()
.
On iOS, all detected licenses will also appear in the Settings app under the app's information section. This is done to comply with Apple's guidelines, which require apps to provide open-source license acknowledgments in a visible location.
If you want to use the license management functionality in a Node.js project or any non-React Native application, you can either:
license-kit
CLI tool, which is a standalone tool that can be used in any Node.js project to generate license metadata - see this section for more details@callstack/react-native-legal-shared
package, which exposes the core functionalities of this tool - see this section for more detailsFor more notes on the mechanics of the tool, please see core additional details section.
For a list of known limitations, please see the Known Limitations section in the shared package's documentation.