Skip to content

[iOS][Improvement] RCTWebSocketExecutor method could guess the devtools host via the ip.txt file #15943

@yuriy-yarosh

Description

@yuriy-yarosh

Is this a bug report?

Yes (Mostly)

Have you read the Contributing Guidelines?

Yes

Environment

  1. react-native -v: 0.48.3
  2. node -v: v8.4.0
  3. npm -v: 5.3.0
  4. yarn --version: 0.23.4
  • Target Platform: iOS11
  • Development Operating System: macOS 10.12.6 (16G29)
  • Build tools: XCode 9 beta

Steps to Reproduce

  1. Want to automate the RCTWebSocketExecutor react-devtools host detection.
  2. sed -i '' it all the way... Anyways, I'm using ngrok, so, it's a bit bothersome.
  3. Well, if RCTBundleURLProvider already has guessPackagerHost method which uses ip.txt file in the main bundle, we could use that to pass the hostname for the RCTWebSocketExecutor.

Expected Behavior

Less regex's and manual RCTWebSocketExecutor patching.

Actual Behavior

Official documentation states explicitly to patch the RCTWebSocketExecutor.m file which isn't a great way of handling such things.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Help Wanted :octocat:Issues ideal for external contributors.Ran CommandsOne of our bots successfully processed a command.StaleThere has been a lack of activity on this issue and it may be closed soon.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions