diff --git a/scripts/react-native-xcode.sh b/scripts/react-native-xcode.sh index 30a5ac2227a..54a4eb9de34 100755 --- a/scripts/react-native-xcode.sh +++ b/scripts/react-native-xcode.sh @@ -58,9 +58,8 @@ esac # Path to react-native folder inside node_modules REACT_NATIVE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" -# The project should be located next to where react-native is installed -# in node_modules. -PROJECT_ROOT=${PROJECT_ROOT:-"$REACT_NATIVE_DIR/../.."} +# Most projects have their project root, one level up from their Xcode project dir (the "ios" directory) +PROJECT_ROOT=${PROJECT_ROOT:-"$PROJECT_DIR/.."} cd "$PROJECT_ROOT" || exit