---
title: "Nutrient React Native SDK 2.16 migration guide"
canonical_url: "https://www.nutrient.io/guides/react-native/migration-guides/react-native-2-16-migration-guide/"
md_url: "https://www.nutrient.io/guides/react-native/migration-guides/react-native-2-16-migration-guide.md"
last_updated: "2026-05-25T18:42:17.795Z"
description: "Learn how to migrate to Nutrient React Native SDK 2.16."
---

This guide covers migrating to Nutrient React Native SDK 2.16. The most notable change is that the behavior of the annotations APIs has been updated with the addition of the [`applyInstantJSON`](https://www.nutrient.io/api/react-native/PDFDocument.html#.applyInstantJSON) API.

## Adding annotations

In previous versions, the [`addAnnotations`](https://www.nutrient.io/api/react-native/PDFDocument.html#.addAnnotations) API was used to add Document JSON to the current document:

```typescript

const annotationJSON = {
	annotations: [
		{
			// Annotation in Instant JSON format.
		},
	],
	format: 'https://pspdfkit.com/instant-json/v1',
};

const result = await this.pdfRef.current?.getDocument().addAnnotations(annotationJSON);

```

Going forward, the [`addAnnotations`](https://www.nutrient.io/api/react-native/PDFDocument.html#.addAnnotations) API will be used to add an array of typed annotations in Instant JSON format to the current document:

```typescript

const inkAnnotation: InkAnnotation = new InkAnnotation({
	// Annotation properties.
});

const result = await this.pdfRef.current?.getDocument().addAnnotations([inkAnnotation]);

```

To apply more complex annotations — such as image annotations, which include attachments — use Document JSON in conjunction with the [`applyInstantJSON`](https://www.nutrient.io/api/react-native/PDFDocument.html#.applyInstantJSON) API:

```typescript

const documentJSON: DocumentJSON = {
	annotations: [
		{
			// Annotation in Instant JSON format.
		},
	],
	format: 'https://pspdfkit.com/instant-json/v1',
	attachments: {
		'492adff9842bff7dcb81a20950870be8a0bb665c8d48175680c1e5e1070243ff': {
			binary: 'base64-image-data',
			contentType: 'image/png',
		},
	},
};

const result = await this.pdfRef.current?.getDocument().applyInstantJSON(documentJSON);

```

## Maven dependency

After rebranding to Nutrient, our Maven dependency URL also changed. In your application’s `build.gradle` file found inside the `android` directory, apply the following update:

You must first [log in to the Nutrient Portal](https://my.nutrient.io/users/sign_in) before accessing the Maven repository.

```diff

allprojects {
    repositories {
        google()
        mavenLocal()
        mavenCentral()
        maven {

-            url 'https://my.pspdfkit.com/maven/'

+            url 'https://my.nutrient.io/maven/'
        }
    }
}

```

For more information, refer to the [Nutrient React Native SDK 2.16 changelog](https://www.nutrient.io/guides/react-native/changelog.md#2.16).
---

## Related pages

- [React Native 2 12 Migration Guide](/guides/react-native/migration-guides/react-native-2-12-migration-guide.md)
- [React Native 2 13 Migration Guide](/guides/react-native/migration-guides/react-native-2-13-migration-guide.md)
- [React Native 2 2 Migration Guide](/guides/react-native/migration-guides/react-native-2-2-migration-guide.md)
- [React Native 2 9 Migration Guide](/guides/react-native/migration-guides/react-native-2-9-migration-guide.md)
- [React Native 2 3 Migration Guide](/guides/react-native/migration-guides/react-native-2-3-migration-guide.md)
- [React Native 2 8 Migration Guide](/guides/react-native/migration-guides/react-native-2-8-migration-guide.md)
- [React Native 3 Migration Guide](/guides/react-native/migration-guides/react-native-3-migration-guide.md)
- [How to upgrade to the latest React Native version](/guides/react-native/migration-guides/upgrading.md)
- [React Native 4 Migration Guide](/guides/react-native/migration-guides/react-native-4-migration-guide.md)

