File tree Expand file tree Collapse file tree 1 file changed +14
-13
lines changed Expand file tree Collapse file tree 1 file changed +14
-13
lines changed Original file line number Diff line number Diff line change 8
8
# This script is supposed to be invoked as part of Xcode build process
9
9
# and relies on environment variables (including PWD) set by Xcode
10
10
11
+ # Print commands before executing them (useful for troubleshooting)
12
+ set -x
13
+ DEST=$CONFIGURATION_BUILD_DIR /$UNLOCALIZED_RESOURCES_FOLDER_PATH
14
+
15
+ # Enables iOS devices to get the IP address of the machine running Metro Bundler
16
+ if [[ " $CONFIGURATION " = * Debug* && ! " $PLATFORM_NAME " == * simulator ]]; then
17
+ IP=$( ipconfig getifaddr en0)
18
+ if [ -z " $IP " ]; then
19
+ IP=$( ifconfig | grep ' inet ' | grep -v ' 127.' | cut -d\ -f2 | awk ' NR==1{print $1}' )
20
+ fi
21
+
22
+ echo " $IP " > " $DEST /ip.txt"
23
+ fi
24
+
11
25
if [[ " $SKIP_BUNDLING " ]]; then
12
26
echo " SKIP_BUNDLING enabled; skipping."
13
27
exit 0;
@@ -90,19 +104,6 @@ nodejs_not_found()
90
104
91
105
type $NODE_BINARY > /dev/null 2>&1 || nodejs_not_found
92
106
93
- # Print commands before executing them (useful for troubleshooting)
94
- set -x
95
- DEST=$CONFIGURATION_BUILD_DIR /$UNLOCALIZED_RESOURCES_FOLDER_PATH
96
-
97
- if [[ " $CONFIGURATION " = * Debug* && ! " $PLATFORM_NAME " == * simulator ]]; then
98
- IP=$( ipconfig getifaddr en0)
99
- if [ -z " $IP " ]; then
100
- IP=$( ifconfig | grep ' inet ' | grep -v ' 127.' | cut -d\ -f2 | awk ' NR==1{print $1}' )
101
- fi
102
-
103
- echo " $IP " > " $DEST /ip.txt"
104
- fi
105
-
106
107
BUNDLE_FILE=" $DEST /main.jsbundle"
107
108
108
109
$NODE_BINARY " $CLI_PATH " $BUNDLE_COMMAND \
You can’t perform that action at this time.
0 commit comments