Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 25.2k
Implemented automatic IP detection for iOS#8091
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
fd5c7c00793bb39d4902fff19d6da12038a8e2a82cFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -68,6 +68,15 @@ type $NODE_BINARY >/dev/null 2>&1 || nodejs_not_found | ||
| set -x | ||
| DEST=$CONFIGURATION_BUILD_DIR/$UNLOCALIZED_RESOURCES_FOLDER_PATH | ||
| if [[ "$CONFIGURATION" = "Debug" && "$PLATFORM_NAME" != "iphonesimulator" ]]; then | ||
| PLISTBUDDY='/usr/libexec/PlistBuddy' | ||
| PLIST=$TARGET_BUILD_DIR/$INFOPLIST_PATH | ||
| IP=$(ipconfig getifaddr en0) | ||
| $PLISTBUDDY -c "Add NSAppTransportSecurity:NSExceptionDomains:localhost:NSTemporaryExceptionAllowsInsecureHTTPLoads bool true" $PLIST | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Some questions here:
ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not completely sure about this, but it doesn't modify the original plist. However, it seems like it only copies the original plist when it is changed. Doing multiple builds, there are some "Entry already exists" messages, but it doesn't signal an error and I think it can be safely ignored. | ||
| $PLISTBUDDY -c "Add NSAppTransportSecurity:NSExceptionDomains:$IP.xip.io:NSTemporaryExceptionAllowsInsecureHTTPLoads bool true" $PLIST | ||
| echo "$IP.xip.io" > "$DEST/ip.txt" | ||
| fi | ||
| $NODE_BINARY "$REACT_NATIVE_DIR/local-cli/cli.js" bundle \ | ||
| --entry-file index.ios.js \ | ||
| --platform ios \ | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you gate this with
RCT_DEV? We don't want to run this in production.