From d4f2cd2c72469960ecd96a51919c4336a3399549 Mon Sep 17 00:00:00 2001 From: "Oleg E. Bakharev" Date: Thu, 19 Dec 2019 23:05:51 +0300 Subject: [PATCH] Fix LAN instead of Wi-Fi device bundle config React-native server-device connection must be via Wi-Fi. But if the OS-X server has LAN & Wi-Fi interfaces, then device bundle can be incorrectly configured to use LAN interface instead of Wi-Fi. This patch fix this issue. It greps for "baseT" (e.g. media: autoselect (1000baseT )) and skip interface if it is. --- scripts/react-native-xcode.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/react-native-xcode.sh b/scripts/react-native-xcode.sh index 6e80f843fab9a5..da9e44ca399c67 100755 --- a/scripts/react-native-xcode.sh +++ b/scripts/react-native-xcode.sh @@ -15,7 +15,7 @@ DEST=$CONFIGURATION_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH # Enables iOS devices to get the IP address of the machine running Metro if [[ "$CONFIGURATION" = *Debug* && ! "$PLATFORM_NAME" == *simulator ]]; then IP=$(ipconfig getifaddr en0) - if [ -z "$IP" ]; then + if [[ -z "$IP" || -n "`ifconfig $value | grep 'baseT'`" ]]; then IP=$(ipconfig getifaddr en1) fi if [ -z "$IP" ]; then