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 88#  This script is supposed to be invoked as part of Xcode build process
99#  and relies on environment variables (including PWD) set by Xcode
1010
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+ 
1125if  [[ " $SKIP_BUNDLING "   ]];  then 
1226  echo  " SKIP_BUNDLING enabled; skipping." 
1327  exit  0; 
@@ -90,19 +104,6 @@ nodejs_not_found()
90104
91105type  $NODE_BINARY  > /dev/null 2>&1  ||  nodejs_not_found
92106
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- 
106107BUNDLE_FILE=" $DEST /main.jsbundle" 
107108
108109$NODE_BINARY  " $CLI_PATH "   $BUNDLE_COMMAND  \
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments