diff --git a/build-system-tests/scripts/mega-app-install.sh b/build-system-tests/scripts/mega-app-install.sh index 9f5e5b17fa..34e57f5a30 100755 --- a/build-system-tests/scripts/mega-app-install.sh +++ b/build-system-tests/scripts/mega-app-install.sh @@ -105,7 +105,8 @@ if [ "$PKG_MANAGER" == 'yarn' ]; then yarn add $DEPENDENCIES else if [[ "$FRAMEWORK" == "react-native" ]]; then - DEPENDENCIES="$TAGGED_UI_FRAMEWORK @aws-amplify/react-native aws-amplify react-native-safe-area-context@^4.14.0 @react-native-community/netinfo @react-native-async-storage/async-storage react-native-get-random-values react-native-url-polyfill" + # react-native-safe-area-context v5.0.0+ does not support RN 0.74 and lower + DEPENDENCIES="$TAGGED_UI_FRAMEWORK @aws-amplify/react-native aws-amplify react-native-safe-area-context@^4.2.5 @react-native-community/netinfo @react-native-async-storage/async-storage react-native-get-random-values react-native-url-polyfill" echo "npm install $DEPENDENCIES" npm install $DEPENDENCIES if [[ "$BUILD_TOOL" == "expo" ]]; then @@ -115,7 +116,7 @@ else npx expo install react-native@~0.75.0 fi echo "npx expo install --fix" - npx expo install --fix # fix the dependencies that are incompatible with the installed expo versio + npx expo install --fix # fix the dependencies that are incompatible with the installed expo version fi else install_dependencies_with_retries npm "$DEPENDENCIES" diff --git a/docs/src/components/ExpoSnack.tsx b/docs/src/components/ExpoSnack.tsx index dc402f97e7..97dea927d6 100644 --- a/docs/src/components/ExpoSnack.tsx +++ b/docs/src/components/ExpoSnack.tsx @@ -35,7 +35,7 @@ const defaultOptions: SnackOptions = { '@aws-amplify/rtn-web-browser', '@aws-amplify/ui-react-native', 'aws-amplify@5.3.11', - 'react-native-safe-area-context', + 'react-native-safe-area-context@^4.2.5', '@react-native-community/netinfo', '@react-native-async-storage/async-storage', 'react-native-get-random-values', diff --git a/docs/src/data/frameworks.ts b/docs/src/data/frameworks.ts index bc19d89da0..39a3c2e85b 100644 --- a/docs/src/data/frameworks.ts +++ b/docs/src/data/frameworks.ts @@ -54,7 +54,7 @@ export const AMPLIFY_5_UI_VERSIONS: Record = { // React Native requires direct installation of dependencies with native modules export const REACT_NATIVE_DEPENDENCIES = - '@aws-amplify/react-native react-native-safe-area-context @react-native-community/netinfo @react-native-async-storage/async-storage react-native-get-random-values'; + '@aws-amplify/react-native react-native-safe-area-context@^4.2.5 @react-native-community/netinfo @react-native-async-storage/async-storage react-native-get-random-values'; export const FRAMEWORK_INSTALL_SCRIPTS = { react: 'npm i @aws-amplify/ui-react aws-amplify',