diff --git a/packages/react-native/Libraries/AppDelegate/React-RCTAppDelegate.podspec b/packages/react-native/Libraries/AppDelegate/React-RCTAppDelegate.podspec index 1fa8fc0e2ddc8a..1c1ae9b5a4a9d7 100644 --- a/packages/react-native/Libraries/AppDelegate/React-RCTAppDelegate.podspec +++ b/packages/react-native/Libraries/AppDelegate/React-RCTAppDelegate.podspec @@ -99,7 +99,8 @@ Pod::Spec.new do |s| s.script_phases = { :name => "Generate Legacy Components Interop", :script => " -. ${PODS_ROOT}/../.xcode.env +WITH_ENVIRONMENT=\"$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh\" +source $WITH_ENVIRONMENT ${NODE_BINARY} ${REACT_NATIVE_PATH}/scripts/codegen/generate-legacy-interop-components.js -p #{ENV['APP_PATH']} -o ${REACT_NATIVE_PATH}/Libraries/AppDelegate ", :execution_position => :before_compile,