From 86a8dad24e15352994f92fc737492db37a33a00f Mon Sep 17 00:00:00 2001 From: yuhengsh Date: Fri, 31 May 2024 15:20:22 -0700 Subject: [PATCH 1/4] Add 1.1.x version for js React Native v5 push notification --- .../react-native/getting_started/40_install_lib.mdx | 8 +++++++- .../react-native/migrate-from-previous-version.mdx | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/fragments/lib-v1/push-notifications/react-native/getting_started/40_install_lib.mdx b/src/fragments/lib-v1/push-notifications/react-native/getting_started/40_install_lib.mdx index c016d9b426f..f6b87f25058 100644 --- a/src/fragments/lib-v1/push-notifications/react-native/getting_started/40_install_lib.mdx +++ b/src/fragments/lib-v1/push-notifications/react-native/getting_started/40_install_lib.mdx @@ -1,9 +1,15 @@ In your project directory, you should first install the necessary dependencies for using Amplify Push Notifications. ```bash -npm install aws-amplify@^5 @aws-amplify/rtn-push-notification amazon-cognito-identity-js @react-native-community/netinfo @react-native-async-storage/async-storage react-native-get-random-values react-native-url-polyfill +npm install aws-amplify@^5 @aws-amplify/rtn-push-notification@~1.1.x amazon-cognito-identity-js @react-native-community/netinfo @react-native-async-storage/async-storage react-native-get-random-values react-native-url-polyfill ``` + + + Please note that v5 is compatible only with @aws-amplify/rtn-push-notification version 1.1.x + + + You will also need to add the crypto.getRandomValues and URL polyfills to your application's entry point file (in most React Native apps this will be the top level `index.js`). ```js diff --git a/src/fragments/lib-v1/push-notifications/react-native/migrate-from-previous-version.mdx b/src/fragments/lib-v1/push-notifications/react-native/migrate-from-previous-version.mdx index 4dbe06ff934..0455a3a0222 100644 --- a/src/fragments/lib-v1/push-notifications/react-native/migrate-from-previous-version.mdx +++ b/src/fragments/lib-v1/push-notifications/react-native/migrate-from-previous-version.mdx @@ -31,9 +31,15 @@ Please note that it's recommended to delete your `yarn.lock` file, `package-lock 2. Add the new native module to your project. ```bash -npm install @aws-amplify/rtn-push-notification +npm install @aws-amplify/rtn-push-notification@~1.1.x ``` + + + Please note that v5 is compatible only with @aws-amplify/rtn-push-notification version 1.1.x + + + ## Update build configurations From 5232b9d06229b6057a78e0c3af8e8028e8749cf7 Mon Sep 17 00:00:00 2001 From: yuhengshs <94558971+yuhengshs@users.noreply.github.com> Date: Mon, 3 Jun 2024 09:18:08 -0700 Subject: [PATCH 2/4] Update src/fragments/lib-v1/push-notifications/react-native/getting_started/40_install_lib.mdx Adjusted working suggested by Rene Co-authored-by: Rene Brandel <4989523+renebrandel@users.noreply.github.com> --- .../react-native/getting_started/40_install_lib.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fragments/lib-v1/push-notifications/react-native/getting_started/40_install_lib.mdx b/src/fragments/lib-v1/push-notifications/react-native/getting_started/40_install_lib.mdx index f6b87f25058..6cc5b3716cf 100644 --- a/src/fragments/lib-v1/push-notifications/react-native/getting_started/40_install_lib.mdx +++ b/src/fragments/lib-v1/push-notifications/react-native/getting_started/40_install_lib.mdx @@ -6,7 +6,7 @@ npm install aws-amplify@^5 @aws-amplify/rtn-push-notification@~1.1.x amazon-cogn - Please note that v5 is compatible only with @aws-amplify/rtn-push-notification version 1.1.x +Note: Amplify JavaScript v5 is only compatible with @aws-amplify/rtn-push-notification version 1.1.x From e4881bbdcac61061a5679bf047a2cebe7f8a8655 Mon Sep 17 00:00:00 2001 From: yuhengshs <94558971+yuhengshs@users.noreply.github.com> Date: Mon, 3 Jun 2024 09:20:30 -0700 Subject: [PATCH 3/4] Update migrate-from-previous-version.mdx Adjusted the wording of call out for v5 supported rtn-push-notification version --- .../react-native/migrate-from-previous-version.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fragments/lib-v1/push-notifications/react-native/migrate-from-previous-version.mdx b/src/fragments/lib-v1/push-notifications/react-native/migrate-from-previous-version.mdx index 0455a3a0222..ef574f9e1f4 100644 --- a/src/fragments/lib-v1/push-notifications/react-native/migrate-from-previous-version.mdx +++ b/src/fragments/lib-v1/push-notifications/react-native/migrate-from-previous-version.mdx @@ -36,7 +36,7 @@ npm install @aws-amplify/rtn-push-notification@~1.1.x - Please note that v5 is compatible only with @aws-amplify/rtn-push-notification version 1.1.x + Note: Amplify JavaScript v5 is only compatible with @aws-amplify/rtn-push-notification version 1.1.x From 5a42cc353f189685c0069f55e2186d35c7d40108 Mon Sep 17 00:00:00 2001 From: yuhengshs <94558971+yuhengshs@users.noreply.github.com> Date: Mon, 3 Jun 2024 09:22:33 -0700 Subject: [PATCH 4/4] removed indented spaces in migrate-from-previous-version.mdx --- .../react-native/migrate-from-previous-version.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fragments/lib-v1/push-notifications/react-native/migrate-from-previous-version.mdx b/src/fragments/lib-v1/push-notifications/react-native/migrate-from-previous-version.mdx index ef574f9e1f4..04c01dc495b 100644 --- a/src/fragments/lib-v1/push-notifications/react-native/migrate-from-previous-version.mdx +++ b/src/fragments/lib-v1/push-notifications/react-native/migrate-from-previous-version.mdx @@ -36,7 +36,7 @@ npm install @aws-amplify/rtn-push-notification@~1.1.x - Note: Amplify JavaScript v5 is only compatible with @aws-amplify/rtn-push-notification version 1.1.x +Note: Amplify JavaScript v5 is only compatible with @aws-amplify/rtn-push-notification version 1.1.x