Skip to content

[iOS] Switch NSAllowsLocalNetworking to false in production build #898

Open
@danilvalov

Description

@danilvalov

Introduction

As I understand, this option is needed to connect to a local Metro server. But it is not required for production builds. However, it could potentially become a security threat to the application.

Details

I suggest adding an automatic switch for this parameter: NSAllowsLocalNetworking: true only for debug builds, and NSAllowsLocalNetworking: false for production.

Discussion points

Maybe I don't fully understand the architecture of react native, and this parameter is used for some external needs. If so, please write about it.

But if there is any sense in my words, then please write an example of code implementation to add this switch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions