diff --git a/packager/react-native-xcode.sh b/packager/react-native-xcode.sh index ec4e0d14de3c75..fdeb87734894dc 100755 --- a/packager/react-native-xcode.sh +++ b/packager/react-native-xcode.sh @@ -75,6 +75,9 @@ if [[ "$CONFIGURATION" = "Debug" && "$PLATFORM_NAME" != "iphonesimulator" ]]; th PLISTBUDDY='/usr/libexec/PlistBuddy' PLIST=$TARGET_BUILD_DIR/$INFOPLIST_PATH IP=$(ipconfig getifaddr en0) + if [ -z "$IP" ]; then + IP=$(ipconfig getifaddr en1) + fi $PLISTBUDDY -c "Add NSAppTransportSecurity:NSExceptionDomains:localhost:NSTemporaryExceptionAllowsInsecureHTTPLoads bool true" "$PLIST" $PLISTBUDDY -c "Add NSAppTransportSecurity:NSExceptionDomains:$IP.xip.io:NSTemporaryExceptionAllowsInsecureHTTPLoads bool true" "$PLIST" echo "$IP.xip.io" > "$DEST/ip.txt"