Skip to content

Use HTTPS for the packager server #15597

Description

@jankalfus

When developing for iOS on a real device, you might have to set an IP address of your Mac in the RCTWebSocketExecutor.m file, instead of using localhost, otherwise you're not able to connect to it. I don't know if this is caused by strict policy of those who manage Wi-Fi in the offices or whatever, but it doesn't matter.

The main issue here is that the packager is using HTTP, not HTTPS and ATS policy on iOS disallows any insecure traffic for anything that's not localhost. Also, Apple doesn't allow you to create an exception in the Info.plist file for an IP address, only domain. So you have to use some cumbersome workaround like this one: https://stackoverflow.com/a/45798216/3979621

Please consider switching to HTTPS. It took me half a day to get around this problem, and I'm sure I'm not the only one.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Ran CommandsOne of our bots successfully processed a command.Resolution: LockedThis issue was locked by the bot.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions