SKIP_BUNDLING prevents generating packager host IP for debugging on iOS devices #20553
Labels
Platform: iOS
iOS applications.
Resolution: Locked
This issue was locked by the bot.
Resolution: PR Submitted
A pull request with a fix has been provided.
Duplicate of #17301, which was closed due to being stale.
Environment
Description
When setting
SKIP_BUNDLING
before a clean build of a React Native application for an iOS device (not a simulator), theip.txt
file is not generated in the build directory, preventing the application from getting the packager host's IP address inguessPackagerHost
.This only affects projects whose build directories have been cleaned; if the project has been built before when
SKIP_BUNDLING
is not set,ip.txt
is generated and remains there even afterSKIP_BUNDLING
is later set.Reproducible Demo
These steps describe building from Xcode, but a previous version of this issue describes reproducible steps using
react-native run-ios
. I built from Xcode to demonstrate in the Xcode debugger that a value isnil
when it should not be.rimraf ~/Library/Developer/Xcode/DerivedData
react-native init NewProject1
open NewProject1/ios/NewProject1.xcodeproj
Add
export SKIP_BUNDLING=1
to the build phaseBundle React Native code and images
Build and run the application on an iOS device
Expected behavior
Application generates a
jsCodeLocation
that includes packager host's IP address. i.e.http://192.168.0.19:8081/index.bundle?platform=ios&dev=true&minify=false
Application loads JS bundle from packager
Actual behavior
Application fails to load React Native view, with error


No bundle URL present. Make sure you're running a packager server or...
The text was updated successfully, but these errors were encountered: