---
title: "Add a Nutrient license key in React Native"
canonical_url: "https://www.nutrient.io/guides/react-native/troubleshooting/add-license-key/"
md_url: "https://www.nutrient.io/guides/react-native/troubleshooting/add-license-key.md"
last_updated: "2026-05-25T18:42:17.799Z"
description: "Learn how to generate and add a Nutrient license key for your React Native app."
---

# Guide to adding a Nutrient license key in React Native

Nutrient is a commercial product and uses a license key to verify your copy against the package name you registered.

## Generating the license key

To use a Nutrient license with your app, you have to generate a license key and bind it to the `applicationId` (bundle ID) of your app.

1. Log in to the [Nutrient Portal](https://my.nutrient.io/) using the credentials you received when purchasing Nutrient. You’ll see the list of all your purchased licenses.

2. Locate your license (for example, Nutrient iOS SDK) and click the **Assign license key** button next to it. A dialog will open.

3. Enter the bundle ID of your production app. If you’re unsure about this step, read our [What is a bundle ID?](https://www.nutrient.io/guides/react-native/troubleshooting/what-is-a-bundle-id.md) guide first.

4. Click **Next** and confirm your selected bundle ID. Doublecheck that the chosen identifier matches the one configured in your app, as it can no longer be changed once it’s been set.

## Getting the license key

1. Log in to the [Nutrient Portal](https://my.nutrient.io/) using the credentials you received when purchasing Nutrient. You’ll see the list of all your purchased licenses.

2. Locate your license (for example, Nutrient iOS SDK) and click the **License Key** button next to it. If there is no such button, you probably need to generate the license key first.

3. A dialog will open showing you a code snippet with your license key.

4. After copying the license key over to your project, Nutrient SDK will be ready to use.

## Adding the license key

It’s important that you set the license key before using any Nutrient API.

**New architecture support** — The `NativeModules.Nutrient` API works the same way in both old and new architectures. The SDK uses TurboModules that export the same module name, so no changes are required when migrating to the new architecture.

```js

import React, { Component } from 'react';
import { AppRegistry, NativeModules, Platform } from 'react-native';
import NutrientView from '@nutrient-sdk/react-native';

const Nutrient = NativeModules.Nutrient;
Nutrient.setLicenseKey(null);

const DOCUMENT =
	Platform.OS === 'ios'? 'Document.pdf'
		: 'file:///android_asset/Document.pdf';
export default class App extends Component<{}> {
	var pdfRef: React.RefObject<NutrientView | null> = React.createRef();
	render() {
		return (
			<NutrientView
				document={DOCUMENT}
				ref={pdfRef}
				fragmentTag="PDF1"
				style={{ flex: 1 }}
			/>
		);
	}
}

AppRegistry.registerComponent('App', () => App);

```
---

## Related pages

- [Android Gradle Plugin Requires Java 11](/guides/react-native/troubleshooting/android-gradle-plugin-requires-java-11.md)
- [How to find your iOS app bundle ID easily](/guides/react-native/troubleshooting/finding-the-bundle-id.md)
- [NutrientView inside a modal is blank or crashes on Android](/guides/react-native/troubleshooting/nutrientview-modal-android.md)
- [Find out your Nutrient version easily](/guides/react-native/troubleshooting/getting-the-currently-used-version.md)
- [Fixing Android back button crash with Nutrient](/guides/react-native/troubleshooting/handling-back-navigation-with-react-native-screens.md)
- [Fix new architecture build issues in React Native](/guides/react-native/troubleshooting/new-architecture-build-issues.md)
- [Nightlies](/guides/react-native/troubleshooting/nightlies.md)
- [Out Of Memory Error React Native Android](/guides/react-native/troubleshooting/out-of-memory-error-react-native-android.md)
- [Managing Nutrient's render cache effectively](/guides/react-native/troubleshooting/outdated-render-cache.md)
- [React Navigation](/guides/react-native/troubleshooting/react-navigation.md)
- [Understanding app IDs in Android development](/guides/react-native/troubleshooting/what-is-an-app-id.md)
- [Understanding bundle IDs for iOS app development](/guides/react-native/troubleshooting/what-is-a-bundle-id.md)
- [Fix Xcode error code 65 for React Native on M1 Macs](/guides/react-native/troubleshooting/xcode-error-65-missing-required-target-architectures-react-native.md)
- [Textinput Error React Native Android](/guides/react-native/troubleshooting/textinput-error-react-native-android.md)
- [CMake/Ninja build error caused by long file paths on Windows](/guides/react-native/troubleshooting/windows-path-length-cmake-error.md)
- [View controller-based status bar appearance](/guides/react-native/troubleshooting/view-controller-based-status-bar-appearance.md)

