Skip to content

Commit 877cd1b

Browse files
huntiefacebook-github-bot
authored andcommitted
Remove run Metro hook from Xcode build, remove launchPackager scripts (#38242)
Summary: Pull Request resolved: facebook/react-native#38242 See proposal: react-native-community/discussions-and-proposals#681 **Removed script files** I searched GitHub (and specifically `react-native-windows/macos`) to confirm these files are not referenced: - `scripts/launchPackager.bat` - `scripts/launchPackager.command` - `scripts/.packager.env` Interestingly, React Native CLI refers to a `.packager.env` at a different location (`node_modules/.bin/`), and includes modified copies of `launchPackager.command/bat`. This PR removes duplication with these. Changelog: [iOS][Breaking] Metro will no longer be started when running builds via Xcode Reviewed By: cortinico Differential Revision: D47297469 fbshipit-source-id: 06c3602d58b21ed693c3daa763d99947a70bfc5a Original-Commit: facebook/react-native@dc68457
1 parent b07c2b1 commit 877cd1b

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

template/ios/HelloWorld.xcodeproj/project.pbxproj

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@
177177
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "HelloWorld" */;
178178
buildPhases = (
179179
C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */,
180-
FD10A7F022414F080027D42C /* Start Packager */,
181180
13B07F871A680F5B00A75B9A /* Sources */,
182181
13B07F8C1A680F5B00A75B9A /* Frameworks */,
183182
13B07F8E1A680F5B00A75B9A /* Resources */,
@@ -378,25 +377,6 @@
378377
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-HelloWorld-HelloWorldTests/Pods-HelloWorld-HelloWorldTests-resources.sh\"\n";
379378
showEnvVarsInLog = 0;
380379
};
381-
FD10A7F022414F080027D42C /* Start Packager */ = {
382-
isa = PBXShellScriptBuildPhase;
383-
buildActionMask = 2147483647;
384-
files = (
385-
);
386-
inputFileListPaths = (
387-
);
388-
inputPaths = (
389-
);
390-
name = "Start Packager";
391-
outputFileListPaths = (
392-
);
393-
outputPaths = (
394-
);
395-
runOnlyForDeploymentPostprocessing = 0;
396-
shellPath = /bin/sh;
397-
shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n";
398-
showEnvVarsInLog = 0;
399-
};
400380
/* End PBXShellScriptBuildPhase section */
401381

402382
/* Begin PBXSourcesBuildPhase section */

0 commit comments

Comments
 (0)