From 8b177adb46255841b835a08f847f49a1aaa30d98 Mon Sep 17 00:00:00 2001 From: Hilke Heremans Date: Mon, 10 Apr 2017 13:10:30 +0200 Subject: [PATCH] Ignore all loopback addresses for ip detection --- packager/react-native-xcode.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packager/react-native-xcode.sh b/packager/react-native-xcode.sh index 1a1c3660dd26b8..dc83971fbe477a 100755 --- a/packager/react-native-xcode.sh +++ b/packager/react-native-xcode.sh @@ -78,7 +78,7 @@ if [[ "$CONFIGURATION" = "Debug" && ! "$PLATFORM_NAME" == *simulator ]]; then PLIST=$TARGET_BUILD_DIR/$INFOPLIST_PATH IP=$(ipconfig getifaddr en0) if [ -z "$IP" ]; then - IP=$(ifconfig | grep 'inet ' | grep -v 127.0.0.1 | cut -d\ -f2 | awk 'NR==1{print $1}') + IP=$(ifconfig | grep 'inet ' | grep -v ' 127.' | cut -d\ -f2 | awk 'NR==1{print $1}') fi if [ -z ${DISABLE_XIP+x} ]; then